@adtrackify/at-tracking-event-types 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.editorconfig CHANGED
@@ -1,12 +1,13 @@
1
- root = true
2
-
3
- [*]
4
- end_of_line = lf
5
- charset = utf-8
6
- trim_trailing_whitespace = true
7
- insert_final_newline = false
8
- indent_style = space
9
- indent_size = 2
10
-
11
- [*.{diff,md}]
12
- trim_trailing_whitespace = false
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ charset = utf-8
6
+ trim_trailing_whitespace = true
7
+ insert_final_newline = false
8
+ indent_style = space
9
+ indent_size = 2
10
+ quote_type=single
11
+
12
+ [*.{diff,md}]
13
+ trim_trailing_whitespace = false
package/.husky/pre-push CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- npm run build
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npm run build
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ declare module '@adtrackify/at-tracking-event-types/index' {
3
3
 
4
4
  }
5
5
  declare module '@adtrackify/at-tracking-event-types/types/adtrackify-event-bus-event' {
6
- import { TrackingEvent } from '@adtrackify/at-tracking-event-types/types/tracking-events/tracking-event-type';
6
+ import { MetricEvent, TrackingEvent } from '@adtrackify/at-tracking-event-types/types/tracking-events/tracking-event-type';
7
7
  export interface AdtrackifyEventBusEvent {
8
8
  eventId: string;
9
9
  eventType: string;
@@ -16,6 +16,21 @@ declare module '@adtrackify/at-tracking-event-types/types/adtrackify-event-bus-e
16
16
  pixelId: string;
17
17
  };
18
18
  }
19
+ export interface AdtrackifyEventBusMetricEvent extends AdtrackifyEventBusEvent {
20
+ eventData: {
21
+ metricEvent: MetricEvent;
22
+ pixelId: string;
23
+ };
24
+ }
25
+
26
+ }
27
+ declare module '@adtrackify/at-tracking-event-types/types/adtrackify-event-types' {
28
+ export enum ADTRACKIFY_EVENT_TYPE {
29
+ TRACKING = "tracking",
30
+ METRIC = "metric",
31
+ IDENTIFY = "identify",
32
+ LOG = "log"
33
+ }
19
34
 
20
35
  }
21
36
  declare module '@adtrackify/at-tracking-event-types/types/adtrackify-standard-events' {
@@ -35,7 +50,9 @@ declare module '@adtrackify/at-tracking-event-types/types/adtrackify-standard-ev
35
50
  VIEW_CART = "view_cart",
36
51
  VIEW_CONTENT = "view_content",
37
52
  SELECT_SHIPPING_METHOD = "select_shipping_method",
38
- VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form"
53
+ VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form",
54
+ METRIC = "metric",
55
+ WEB_VITAL = "web_vital"
39
56
  }
40
57
 
41
58
  }
@@ -419,6 +436,7 @@ declare module '@adtrackify/at-tracking-event-types/types/tracking-events/tracki
419
436
  ipv6Address?: string;
420
437
  sessionId?: string;
421
438
  shopify?: ShopifyInfo;
439
+ adBlockDetected?: boolean;
422
440
  }
423
441
  export interface AdClickInfo {
424
442
  fbp?: string;
@@ -472,21 +490,27 @@ declare module '@adtrackify/at-tracking-event-types/types/tracking-events/tracki
472
490
  }
473
491
  declare module '@adtrackify/at-tracking-event-types/types/tracking-events/tracking-event-type' {
474
492
  import { ADTRACKIFY_STANDARD_EVENT } from '@adtrackify/at-tracking-event-types/types/adtrackify-standard-events';
493
+ import { ADTRACKIFY_EVENT_TYPE } from '@adtrackify/at-tracking-event-types/types/adtrackify-event-types';
475
494
  import { AddressInfo } from '@adtrackify/at-tracking-event-types/types/common/address';
476
495
  import { TrackingEventContext } from '@adtrackify/at-tracking-event-types/types/tracking-events/tracking-event-context';
477
496
  import { TrackingEventIdentity } from '@adtrackify/at-tracking-event-types/types/tracking-events/tracking-event-identity';
478
- export interface TrackingEvent {
497
+ export interface Event {
479
498
  id: string;
480
- type: string;
499
+ type: ADTRACKIFY_EVENT_TYPE;
481
500
  name: ADTRACKIFY_STANDARD_EVENT;
482
501
  pixelId: string;
502
+ sentAtEpoch?: number;
503
+ collectedAt?: string;
504
+ version: string;
483
505
  context?: TrackingEventContext;
506
+ }
507
+ export interface TrackingEvent extends Event {
484
508
  identity?: TrackingEventIdentity;
485
509
  data?: TrackingEventData;
486
510
  testCode?: string;
487
- sentAtEpoch?: number;
488
- collectedAt?: string;
489
- version: string;
511
+ }
512
+ export interface MetricEvent extends Event {
513
+ data: MetricEventData;
490
514
  }
491
515
  export interface TrackingEventData {
492
516
  [key: string]: any;
@@ -538,6 +562,11 @@ declare module '@adtrackify/at-tracking-event-types/types/tracking-events/tracki
538
562
  category4?: string;
539
563
  category5?: string;
540
564
  }
565
+ export interface MetricEventData {
566
+ [key: string]: any;
567
+ name: string;
568
+ value: number;
569
+ }
541
570
  export const Currencies: string[];
542
571
 
543
572
  }
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var a=(e=>(e.PENDING="pending",e.ACTIVE="active",e.INACTIVE="inactive",e))(a||{});var g=(i=>(i.FACEBOOK="facebook",i.TIKTOK="tiktok",i.GOOGLE_ADS="googleAds",i.GOOGLE_ANALYTICS_4="googleAnalytics4",i.HUBSPOT="hubspot",i.WEBHOOK="webhook",i.CUSTOM_HTML="customHTML",i.CUSTOM_JS="customJS",i.SNAPCHAT="snapchat",i.TWITTER="twitter",i.REDDIT="reddit",i))(g||{});var c=(e=>(e.HEADER="header",e.FOOTER="footer",e.BODY="body",e))(c||{});var p=(r=>(r.STARTED="started",r.COMPLETED="completed",r.UNINSTALLED="uninstalled",r.FAILED="failed",r.NONE="none",r))(p||{}),d=(n=>(n.ACTIVE="active",n.CANCELLED="cancelled",n.DECLINED="declined",n.EXPIRED="expired",n.FROZEN="frozen",n.PENDING="pending",n.NOT_SUBMITTED="na",n))(d||{});var f=(s=>(s.MONTHLY="monthly",s.YEARLY="yearly",s))(f||{}),l=(o=>(o.CURRENT="current",o.PAST_DUE="past_due",o.CANCELLED="cancelled",o.FAILED="failed",o))(l||{}),u=(n=>(n.ACTIVE="active",n.CANCELLED="cancelled",n.DECLINED="declined",n.EXPIRED="expired",n.FROZEN="frozen",n.PENDING="pending",n.NOT_SUBMITTED="na",n))(u||{}),m=(e=>(e.STRIPE="stripe",e.PAYPAL="paypal",e.SHOPIFY="shopify",e))(m||{});var x=(t=>(t.ADD_PAYMENT_INFO="add_payment_info",t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_TO_CART="add_to_cart",t.ADD_TO_WISHLIST="add_to_wishlist",t.INITIATE_CHECKOUT="initiate_checkout",t.LEAD="lead",t.LOGIN="login",t.PAGE_VIEW="page_view",t.PURCHASE="purchase",t.REFUND="refund",t.SEARCH="search",t.SIGN_UP="sign_up",t.VIEW_CART="view_cart",t.VIEW_CONTENT="view_content",t.SELECT_SHIPPING_METHOD="select_shipping_method",t.VIRTUALIZED_VIEWED_PAYMENT_FORM="virtualized_viewd_payment_form",t))(x||{});var w=["AED","ARS","AUD","BDT","BIF","BOB","BRL","CAD","CHF","CLP","CNY","COP","CRC","CZK","DKK","DZD","EGP","EUR","GBP","GTQ","HKD","HNL","HUF","IDR","ILS","INR","ISK","JPY","KES","KRW","KWD","KZT","MAD","MOP","MXN","MYR","NGN","NIO","NOK","NZD","PEN","PHP","PKR","PLN","PYG","QAR","RON","RUB","SAR","SEK","SGD","THB","TRY","TWD","USD","VES","VND","ZAR"];export{a as ACCOUNT_STATUS,x as ADTRACKIFY_STANDARD_EVENT,w as Currencies,c as CustomHTMLLocation,g as DESTINATIONS,m as PAYMENT_GATEWAY,l as PAYMENT_STATUS,f as PLAN_BILLING_FREQUENCY,u as SUBSCRIPTION_STATUS,p as ShopifyAppInstallStatus,d as ShopifyAppSubscriptionStatus};
1
+ var s=(n=>(n.PENDING="pending",n.ACTIVE="active",n.INACTIVE="inactive",n))(s||{});var g=(i=>(i.FACEBOOK="facebook",i.TIKTOK="tiktok",i.GOOGLE_ADS="googleAds",i.GOOGLE_ANALYTICS_4="googleAnalytics4",i.HUBSPOT="hubspot",i.WEBHOOK="webhook",i.CUSTOM_HTML="customHTML",i.CUSTOM_JS="customJS",i.SNAPCHAT="snapchat",i.TWITTER="twitter",i.REDDIT="reddit",i))(g||{});var c=(n=>(n.HEADER="header",n.FOOTER="footer",n.BODY="body",n))(c||{});var p=(r=>(r.STARTED="started",r.COMPLETED="completed",r.UNINSTALLED="uninstalled",r.FAILED="failed",r.NONE="none",r))(p||{}),d=(e=>(e.ACTIVE="active",e.CANCELLED="cancelled",e.DECLINED="declined",e.EXPIRED="expired",e.FROZEN="frozen",e.PENDING="pending",e.NOT_SUBMITTED="na",e))(d||{});var f=(a=>(a.MONTHLY="monthly",a.YEARLY="yearly",a))(f||{}),l=(o=>(o.CURRENT="current",o.PAST_DUE="past_due",o.CANCELLED="cancelled",o.FAILED="failed",o))(l||{}),u=(e=>(e.ACTIVE="active",e.CANCELLED="cancelled",e.DECLINED="declined",e.EXPIRED="expired",e.FROZEN="frozen",e.PENDING="pending",e.NOT_SUBMITTED="na",e))(u||{}),m=(n=>(n.STRIPE="stripe",n.PAYPAL="paypal",n.SHOPIFY="shopify",n))(m||{});var x=(t=>(t.ADD_PAYMENT_INFO="add_payment_info",t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_TO_CART="add_to_cart",t.ADD_TO_WISHLIST="add_to_wishlist",t.INITIATE_CHECKOUT="initiate_checkout",t.LEAD="lead",t.LOGIN="login",t.PAGE_VIEW="page_view",t.PURCHASE="purchase",t.REFUND="refund",t.SEARCH="search",t.SIGN_UP="sign_up",t.VIEW_CART="view_cart",t.VIEW_CONTENT="view_content",t.SELECT_SHIPPING_METHOD="select_shipping_method",t.VIRTUALIZED_VIEWED_PAYMENT_FORM="virtualized_viewd_payment_form",t.METRIC="metric",t.WEB_VITAL="web_vital",t))(x||{});var w=["AED","ARS","AUD","BDT","BIF","BOB","BRL","CAD","CHF","CLP","CNY","COP","CRC","CZK","DKK","DZD","EGP","EUR","GBP","GTQ","HKD","HNL","HUF","IDR","ILS","INR","ISK","JPY","KES","KRW","KWD","KZT","MAD","MOP","MXN","MYR","NGN","NIO","NOK","NZD","PEN","PHP","PKR","PLN","PYG","QAR","RON","RUB","SAR","SEK","SGD","THB","TRY","TWD","USD","VES","VND","ZAR"];export{s as ACCOUNT_STATUS,x as ADTRACKIFY_STANDARD_EVENT,w as Currencies,c as CustomHTMLLocation,g as DESTINATIONS,m as PAYMENT_GATEWAY,l as PAYMENT_STATUS,f as PLAN_BILLING_FREQUENCY,u as SUBSCRIPTION_STATUS,p as ShopifyAppInstallStatus,d as ShopifyAppSubscriptionStatus};
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/types/api/account.ts", "../src/types/api/destinations/destinations.ts", "../src/types/api/destinations/third-party-destination-configs.ts", "../src/types/api/shopify-app-install.ts", "../src/types/api/subscription.ts", "../src/types/adtrackify-standard-events.ts", "../src/types/tracking-events/tracking-event-type.ts"],
4
- "sourcesContent": ["import { Subscription } from './subscription';\n\nexport interface Account {\n id: string,\n accountName: string,\n companyName?: string,\n accountStatus: ACCOUNT_STATUS,\n primaryEmail: string,\n publicApiKey?: string,\n subscriptionId?: string,\n pixels?: Pixel[],\n subscription?: Subscription;\n ownerId?: string,\n createdAt: string,\n updatedAt: string;\n}\n\n\nexport interface Pixel {\n id: string;\n accountId: string;\n name: string;\n createdAt: string,\n updatedAt: string;\n}\n\nexport enum ACCOUNT_STATUS {\n PENDING = 'pending',\n ACTIVE = 'active',\n INACTIVE = 'inactive'\n}", "\r\nexport interface Destination {\r\n id: string,\r\n accountId: string,\r\n pixelId: string,\r\n destination: string;\r\n displayName?: string,\r\n enabled: boolean;\r\n configuration?: UserDestinationConfiguration,\r\n createdAt: string,\r\n updatedAt: string;\r\n}\r\n\r\nexport enum DESTINATIONS {\r\n FACEBOOK = 'facebook',\r\n TIKTOK = 'tiktok',\r\n GOOGLE_ADS = 'googleAds',\r\n GOOGLE_ANALYTICS_4 = 'googleAnalytics4',\r\n HUBSPOT = 'hubspot',\r\n WEBHOOK = 'webhook',\r\n CUSTOM_HTML = 'customHTML',\r\n CUSTOM_JS = 'customJS',\r\n SNAPCHAT = 'snapchat',\r\n TWITTER = 'twitter',\r\n REDDIT = 'reddit'\r\n}\r\n\r\nexport interface UserDestinationConfiguration {\r\n [ key: string ]: any;\r\n eventBlacklist?: string[];\r\n events?: EventConfiguration[];\r\n trigger?: DestinationTriggerConfiguration;\r\n}\r\n\r\nexport interface DestinationTriggerConfiguration {\r\n shopify?: ShopifyTriggerConfiguration;\r\n exludeDomains?: string[];\r\n excludePages?: string[];\r\n domains?: string[];\r\n pages?: string[];\r\n}\r\n\r\nexport interface ShopifyTriggerConfiguration {\r\n enabled: boolean;\r\n collections?: string[];\r\n tags?: string[];\r\n}\r\n\r\n\r\nexport interface EventConfiguration {\r\n sourceEventName: string;\r\n exclude?: boolean;\r\n sample: EventSampleConfiguration;\r\n transformations?: EventTransformation[];\r\n}\r\n\r\nexport interface EventTransformation {\r\n transformationEventName: string;\r\n enabled: boolean;\r\n}\r\n\r\nexport interface EventSampleConfiguration {\r\n enabled: boolean;\r\n rate: number;\r\n}\r\n\r\n", "import { Destination, UserDestinationConfiguration } from './destinations';\r\n\r\nexport interface AdTrackifyFacebookDestination extends Destination {\r\n configuration: FacebookPixelConfiguration;\r\n}\r\n\r\nexport interface AdTrackifyTikTokDestination extends Destination {\r\n configuration: TiktokPixelConfiguration;\r\n}\r\n\r\nexport interface AdTrackifyGoogleAnalytics4Destination extends Destination {\r\n configuration: GoogleAnalytics4Configuration;\r\n}\r\n\r\n// Destination Specific configurations below\r\nexport interface FacebookPixelConfiguration extends UserDestinationConfiguration {\r\n apiAccessToken?: string;\r\n enableConversionAPI: boolean;\r\n pixelId: string;\r\n}\r\n\r\nexport interface TiktokPixelConfiguration extends UserDestinationConfiguration {\r\n apiAccessToken?: string;\r\n enableConversionAPI: boolean;\r\n pixelId: string;\r\n}\r\n\r\nexport interface GoogleAnalytics4Configuration extends UserDestinationConfiguration {\r\n apiSecret: string;\r\n measurementId: string;\r\n}\r\n\r\nexport interface GoogleAdsConfiguration extends UserDestinationConfiguration {\r\n pixelId: string;\r\n conversionID: string;\r\n}\r\n\r\nexport interface HubspotPixelConfiguration extends UserDestinationConfiguration {\r\n hubspotId: string;\r\n}\r\n\r\nexport interface SnapchatPixelConfiguration extends UserDestinationConfiguration {\r\n snapchatPixelId: string;\r\n}\r\n\r\nexport interface TwitterPixelConfiguration extends UserDestinationConfiguration {\r\n twitterPixelId: string;\r\n}\r\n\r\nexport interface WebhookConfiguration extends UserDestinationConfiguration {\r\n webhookUrl: string;\r\n}\r\n\r\nexport interface CustomHTMLConfiguration extends UserDestinationConfiguration {\r\n html: string;\r\n location: CustomHTMLLocation;\r\n}\r\n\r\nexport interface CustomJSConfiguration extends UserDestinationConfiguration {\r\n script: string;\r\n async: boolean;\r\n defer: boolean;\r\n location: CustomHTMLLocation;\r\n}\r\n\r\nexport enum CustomHTMLLocation {\r\n HEADER = 'header',\r\n FOOTER = 'footer',\r\n BODY = 'body'\r\n}\r\n\r\n", "export interface ShopifyAppInstall {\n shopifyAppInstallId: string;\n shop: string;\n accessToken?: string;\n appStatus?: string;\n appSubscriptionStatus?: ShopifyAppSubscriptionStatus;\n code?: string;\n hmac?: string;\n host?: string;\n installRequest?: ShopifyInstallRequest;\n isAppEnabled?: boolean;\n pixelId?: string;\n shopInfo?: any;\n state?: string;\n timestamp?: number;\n createdAt: string;\n updatedAt: string;\n}\n\nexport enum ShopifyAppInstallStatus {\n STARTED = 'started',\n COMPLETED = 'completed',\n UNINSTALLED = 'uninstalled',\n FAILED = 'failed',\n NONE = 'none'\n}\nexport enum ShopifyAppSubscriptionStatus {\n ACTIVE = 'active', // approved and billed to shop\n CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation\n DECLINED = 'declined', // subscription declined by merchant\n EXPIRED = 'expired', //wasn't approved within two days of being created\n FROZEN = 'frozen', //on hold due to not payment\n PENDING = 'pending', // pending approval\n NOT_SUBMITTED = 'na' // billing has not yet been attempted\n}\n\nexport interface ShopifyInstallRequest {\n shop?: string;\n session?: string;\n hmac?: string;\n host?: string;\n nonce?: string;\n timestamp?: string;\n status?: string;\n}\n\nexport interface ShopifyStoreInfo {\n // TBD based on shopify api\n [ key: string ]: any;\n}", "\nexport interface Subscription {\n id: string,\n accountId?: string,\n shopifyAppInstallId?: string,\n shopifyDomain?: string,\n stripeCustomerId?: string,\n stripeSubscriptionId?: string,\n stripeCompletedCheckoutSession?: any;\n shopifyChargeId?: string;\n subscriptionPlan?: SubscriptionPlan,\n status?: SUBSCRIPTION_STATUS,\n paymentStatus?: PAYMENT_STATUS,\n paymentGateway?: PAYMENT_GATEWAY,\n createdAt: string,\n updatedAt: string,\n\n}\nexport interface SubscriptionPlan {\n id: number;\n planName: string;\n displayName: string;\n description: string;\n sku: string;\n price: string;\n displayPrice: string;\n billingFrequency: PLAN_BILLING_FREQUENCY;\n trialLengthDays?: number;\n trialRequiresCreditCard?: boolean;\n planDesc?: string[];\n unitPriceText?: string;\n isHighlighted?: boolean;\n isBanner?: boolean;\n bannerText?: string;\n bannerColor?: string;\n stripePriceId?: string;\n stripeProductId?: string;\n}\n\nexport enum PLAN_BILLING_FREQUENCY {\n MONTHLY = 'monthly',\n YEARLY = 'yearly'\n}\n\nexport enum PAYMENT_STATUS {\n CURRENT = 'current',\n PAST_DUE = 'past_due',\n CANCELLED = 'cancelled',\n FAILED = 'failed'\n}\n\nexport enum SUBSCRIPTION_STATUS {\n ACTIVE = 'active', // approved and billed to shop\n CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation\n DECLINED = 'declined', // subscription declined by merchant\n EXPIRED = 'expired', //wasn't approved within two days of being created\n FROZEN = 'frozen', //on hold due to not payment\n PENDING = 'pending', // pending approval\n NOT_SUBMITTED = 'na' // billing has not yet been attempted\n}\nexport enum PAYMENT_GATEWAY {\n STRIPE = 'stripe',\n PAYPAL = 'paypal',\n SHOPIFY = 'shopify'\n}\n", "export enum ADTRACKIFY_STANDARD_EVENT {\n ADD_PAYMENT_INFO = 'add_payment_info',\n ADD_SHIPPING_INFO = 'add_shipping_info',\n ADD_TO_CART = 'add_to_cart',\n ADD_TO_WISHLIST = 'add_to_wishlist',\n // COMPLETE_REGISTRATION: 'complete_registration',\n // CONTACT: 'contact',\n INITIATE_CHECKOUT = 'initiate_checkout',\n LEAD = 'lead',\n LOGIN = 'login',\n PAGE_VIEW = 'page_view',\n PURCHASE = 'purchase',\n REFUND = 'refund',\n SEARCH = 'search',\n // START_TRIAL: 'start_trial',\n // SUBMIT_APPLICATION: 'submit_application',\n // SUBSCRIBE: 'subscribe',\n SIGN_UP = 'sign_up',\n VIEW_CART = 'view_cart',\n VIEW_CONTENT = 'view_content',\n\n\n //\n SELECT_SHIPPING_METHOD = 'select_shipping_method',\n VIRTUALIZED_VIEWED_PAYMENT_FORM = 'virtualized_viewd_payment_form'\n}", "import { ADTRACKIFY_STANDARD_EVENT } from '../adtrackify-standard-events';\nimport { AddressInfo } from '../common/address';\nimport { TrackingEventContext } from './tracking-event-context';\nimport { TrackingEventIdentity } from './tracking-event-identity';\n\nexport interface TrackingEvent {\n id: string;\n type: string;\n name: ADTRACKIFY_STANDARD_EVENT;\n pixelId: string;\n context?: TrackingEventContext;\n identity?: TrackingEventIdentity;\n data?: TrackingEventData;\n testCode?: string;\n sentAtEpoch?: number;\n collectedAt?: string;\n version: string;\n}\n\nexport interface TrackingEventData {\n [ key: string ]: any;\n firstName?: string;\n lastName?: string;\n email?: string;\n phone?: string;\n addresses?: AddressInfo[];\n cartId?: string;\n transactionId?: string;\n affiliation?: string;\n currency?: string;\n price?: number;\n subtotalPrice?: number;\n value?: number;\n tax?: number;\n shipping?: number;\n coupon?: string;\n paymentType?: string;\n shippingTier?: string;\n creativeName?: string;\n creativeSlot?: string;\n locationId?: string;\n promotionId?: string;\n promotionName?: string;\n items?: GenericContent[];\n}\n\nexport interface GenericContent {\n [ key: string ]: any;\n content_type?: string;\n id?: string;\n name?: string;\n sku?: string;\n brand?: string;\n variant?: string;\n coupon?: string;\n currency?: string;\n discount?: number;\n index?: number;\n value?: number;\n price?: number;\n quantity?: number;\n url?: string;\n locationId?: string;\n imageUrl?: string;\n category?: string;\n category2?: string;\n category3?: string;\n category4?: string;\n category5?: string;\n}\n\n\nexport const Currencies: string[] = [ 'AED', 'ARS', 'AUD', 'BDT', 'BIF', 'BOB', 'BRL', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CZK', 'DKK', 'DZD', 'EGP', 'EUR', 'GBP', 'GTQ', 'HKD', 'HNL', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KES', 'KRW', 'KWD', 'KZT', 'MAD', 'MOP', 'MXN', 'MYR', 'NGN', 'NIO', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RUB', 'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD', 'USD', 'VES', 'VND', 'ZAR' ];\n\n"],
5
- "mappings": "AA0BO,IAAKA,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,SAAW,WAHDA,OAAA,ICbL,IAAKC,OACVA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,WAAa,YACbA,EAAA,mBAAqB,mBACrBA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,YAAc,aACdA,EAAA,UAAY,WACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SAXCA,OAAA,ICoDL,IAAKC,OACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,OAAA,IC9CL,IAAKC,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,YAAc,cACdA,EAAA,OAAS,SACTA,EAAA,KAAO,OALGA,OAAA,IAOAC,OACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,cAAgB,KAPNA,OAAA,ICaL,IAAKC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFCA,OAAA,IAKAC,OACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,UAAY,YACZA,EAAA,OAAS,SAJCA,OAAA,IAOAC,OACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,cAAgB,KAPNA,OAAA,IASAC,OACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,QAAU,UAHAA,OAAA,IC5DL,IAAKC,OACVA,EAAA,iBAAmB,mBACnBA,EAAA,kBAAoB,oBACpBA,EAAA,YAAc,cACdA,EAAA,gBAAkB,kBAGlBA,EAAA,kBAAoB,oBACpBA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,OAAS,SAITA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,aAAe,eAIfA,EAAA,uBAAyB,yBACzBA,EAAA,gCAAkC,iCAxBxBA,OAAA,ICwEL,IAAMC,EAAuB,CAAE,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KAAM",
4
+ "sourcesContent": ["import { Subscription } from './subscription';\n\nexport interface Account {\n id: string,\n accountName: string,\n companyName?: string,\n accountStatus: ACCOUNT_STATUS,\n primaryEmail: string,\n publicApiKey?: string,\n subscriptionId?: string,\n pixels?: Pixel[],\n subscription?: Subscription;\n ownerId?: string,\n createdAt: string,\n updatedAt: string;\n}\n\n\nexport interface Pixel {\n id: string;\n accountId: string;\n name: string;\n createdAt: string,\n updatedAt: string;\n}\n\nexport enum ACCOUNT_STATUS {\n PENDING = 'pending',\n ACTIVE = 'active',\n INACTIVE = 'inactive'\n}", "\nexport interface Destination {\n id: string,\n accountId: string,\n pixelId: string,\n destination: string;\n displayName?: string,\n enabled: boolean;\n configuration?: UserDestinationConfiguration,\n createdAt: string,\n updatedAt: string;\n}\n\nexport enum DESTINATIONS {\n FACEBOOK = 'facebook',\n TIKTOK = 'tiktok',\n GOOGLE_ADS = 'googleAds',\n GOOGLE_ANALYTICS_4 = 'googleAnalytics4',\n HUBSPOT = 'hubspot',\n WEBHOOK = 'webhook',\n CUSTOM_HTML = 'customHTML',\n CUSTOM_JS = 'customJS',\n SNAPCHAT = 'snapchat',\n TWITTER = 'twitter',\n REDDIT = 'reddit'\n}\n\nexport interface UserDestinationConfiguration {\n [ key: string ]: any;\n eventBlacklist?: string[];\n events?: EventConfiguration[];\n trigger?: DestinationTriggerConfiguration;\n}\n\nexport interface DestinationTriggerConfiguration {\n shopify?: ShopifyTriggerConfiguration;\n exludeDomains?: string[];\n excludePages?: string[];\n domains?: string[];\n pages?: string[];\n}\n\nexport interface ShopifyTriggerConfiguration {\n enabled: boolean;\n collections?: string[];\n tags?: string[];\n}\n\n\nexport interface EventConfiguration {\n sourceEventName: string;\n exclude?: boolean;\n sample: EventSampleConfiguration;\n transformations?: EventTransformation[];\n}\n\nexport interface EventTransformation {\n transformationEventName: string;\n enabled: boolean;\n}\n\nexport interface EventSampleConfiguration {\n enabled: boolean;\n rate: number;\n}\n\n", "import { Destination, UserDestinationConfiguration } from './destinations';\n\nexport interface AdTrackifyFacebookDestination extends Destination {\n configuration: FacebookPixelConfiguration;\n}\n\nexport interface AdTrackifyTikTokDestination extends Destination {\n configuration: TiktokPixelConfiguration;\n}\n\nexport interface AdTrackifyGoogleAnalytics4Destination extends Destination {\n configuration: GoogleAnalytics4Configuration;\n}\n\n// Destination Specific configurations below\nexport interface FacebookPixelConfiguration extends UserDestinationConfiguration {\n apiAccessToken?: string;\n enableConversionAPI: boolean;\n pixelId: string;\n}\n\nexport interface TiktokPixelConfiguration extends UserDestinationConfiguration {\n apiAccessToken?: string;\n enableConversionAPI: boolean;\n pixelId: string;\n}\n\nexport interface GoogleAnalytics4Configuration extends UserDestinationConfiguration {\n apiSecret: string;\n measurementId: string;\n}\n\nexport interface GoogleAdsConfiguration extends UserDestinationConfiguration {\n pixelId: string;\n conversionID: string;\n}\n\nexport interface HubspotPixelConfiguration extends UserDestinationConfiguration {\n hubspotId: string;\n}\n\nexport interface SnapchatPixelConfiguration extends UserDestinationConfiguration {\n snapchatPixelId: string;\n}\n\nexport interface TwitterPixelConfiguration extends UserDestinationConfiguration {\n twitterPixelId: string;\n}\n\nexport interface WebhookConfiguration extends UserDestinationConfiguration {\n webhookUrl: string;\n}\n\nexport interface CustomHTMLConfiguration extends UserDestinationConfiguration {\n html: string;\n location: CustomHTMLLocation;\n}\n\nexport interface CustomJSConfiguration extends UserDestinationConfiguration {\n script: string;\n async: boolean;\n defer: boolean;\n location: CustomHTMLLocation;\n}\n\nexport enum CustomHTMLLocation {\n HEADER = 'header',\n FOOTER = 'footer',\n BODY = 'body'\n}\n\n", "export interface ShopifyAppInstall {\n shopifyAppInstallId: string;\n shop: string;\n accessToken?: string;\n appStatus?: string;\n appSubscriptionStatus?: ShopifyAppSubscriptionStatus;\n code?: string;\n hmac?: string;\n host?: string;\n installRequest?: ShopifyInstallRequest;\n isAppEnabled?: boolean;\n pixelId?: string;\n shopInfo?: any;\n state?: string;\n timestamp?: number;\n createdAt: string;\n updatedAt: string;\n}\n\nexport enum ShopifyAppInstallStatus {\n STARTED = 'started',\n COMPLETED = 'completed',\n UNINSTALLED = 'uninstalled',\n FAILED = 'failed',\n NONE = 'none'\n}\nexport enum ShopifyAppSubscriptionStatus {\n ACTIVE = 'active', // approved and billed to shop\n CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation\n DECLINED = 'declined', // subscription declined by merchant\n EXPIRED = 'expired', //wasn't approved within two days of being created\n FROZEN = 'frozen', //on hold due to not payment\n PENDING = 'pending', // pending approval\n NOT_SUBMITTED = 'na' // billing has not yet been attempted\n}\n\nexport interface ShopifyInstallRequest {\n shop?: string;\n session?: string;\n hmac?: string;\n host?: string;\n nonce?: string;\n timestamp?: string;\n status?: string;\n}\n\nexport interface ShopifyStoreInfo {\n // TBD based on shopify api\n [ key: string ]: any;\n}", "\nexport interface Subscription {\n id: string,\n accountId?: string,\n shopifyAppInstallId?: string,\n shopifyDomain?: string,\n stripeCustomerId?: string,\n stripeSubscriptionId?: string,\n stripeCompletedCheckoutSession?: any;\n shopifyChargeId?: string;\n subscriptionPlan?: SubscriptionPlan,\n status?: SUBSCRIPTION_STATUS,\n paymentStatus?: PAYMENT_STATUS,\n paymentGateway?: PAYMENT_GATEWAY,\n createdAt: string,\n updatedAt: string,\n\n}\nexport interface SubscriptionPlan {\n id: number;\n planName: string;\n displayName: string;\n description: string;\n sku: string;\n price: string;\n displayPrice: string;\n billingFrequency: PLAN_BILLING_FREQUENCY;\n trialLengthDays?: number;\n trialRequiresCreditCard?: boolean;\n planDesc?: string[];\n unitPriceText?: string;\n isHighlighted?: boolean;\n isBanner?: boolean;\n bannerText?: string;\n bannerColor?: string;\n stripePriceId?: string;\n stripeProductId?: string;\n}\n\nexport enum PLAN_BILLING_FREQUENCY {\n MONTHLY = 'monthly',\n YEARLY = 'yearly'\n}\n\nexport enum PAYMENT_STATUS {\n CURRENT = 'current',\n PAST_DUE = 'past_due',\n CANCELLED = 'cancelled',\n FAILED = 'failed'\n}\n\nexport enum SUBSCRIPTION_STATUS {\n ACTIVE = 'active', // approved and billed to shop\n CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation\n DECLINED = 'declined', // subscription declined by merchant\n EXPIRED = 'expired', //wasn't approved within two days of being created\n FROZEN = 'frozen', //on hold due to not payment\n PENDING = 'pending', // pending approval\n NOT_SUBMITTED = 'na' // billing has not yet been attempted\n}\nexport enum PAYMENT_GATEWAY {\n STRIPE = 'stripe',\n PAYPAL = 'paypal',\n SHOPIFY = 'shopify'\n}\n", "export enum ADTRACKIFY_STANDARD_EVENT {\n ADD_PAYMENT_INFO = 'add_payment_info',\n ADD_SHIPPING_INFO = 'add_shipping_info',\n ADD_TO_CART = 'add_to_cart',\n ADD_TO_WISHLIST = 'add_to_wishlist',\n // COMPLETE_REGISTRATION: 'complete_registration',\n // CONTACT: 'contact',\n INITIATE_CHECKOUT = 'initiate_checkout',\n LEAD = 'lead',\n LOGIN = 'login',\n PAGE_VIEW = 'page_view',\n PURCHASE = 'purchase',\n REFUND = 'refund',\n SEARCH = 'search',\n // START_TRIAL: 'start_trial',\n // SUBMIT_APPLICATION: 'submit_application',\n // SUBSCRIBE: 'subscribe',\n SIGN_UP = 'sign_up',\n VIEW_CART = 'view_cart',\n VIEW_CONTENT = 'view_content',\n\n //\n SELECT_SHIPPING_METHOD = 'select_shipping_method',\n VIRTUALIZED_VIEWED_PAYMENT_FORM = 'virtualized_viewd_payment_form',\n\n METRIC = 'metric',\n WEB_VITAL = 'web_vital',\n}\n", "import { ADTRACKIFY_STANDARD_EVENT } from '../adtrackify-standard-events';\nimport { ADTRACKIFY_EVENT_TYPE } from '../adtrackify-event-types'\nimport { AddressInfo } from '../common/address';\nimport { TrackingEventContext } from './tracking-event-context';\nimport { TrackingEventIdentity } from './tracking-event-identity';\n\nexport interface Event {\n id: string;\n type: ADTRACKIFY_EVENT_TYPE;\n name: ADTRACKIFY_STANDARD_EVENT;\n pixelId: string;\n sentAtEpoch?: number;\n collectedAt?: string;\n version: string;\n context?: TrackingEventContext;\n}\n\nexport interface TrackingEvent extends Event {\n identity?: TrackingEventIdentity;\n data?: TrackingEventData;\n testCode?: string;\n}\n\nexport interface MetricEvent extends Event {\n data: MetricEventData;\n}\n\nexport interface TrackingEventData {\n [key: string]: any;\n firstName?: string;\n lastName?: string;\n email?: string;\n phone?: string;\n addresses?: AddressInfo[];\n cartId?: string;\n transactionId?: string;\n affiliation?: string;\n currency?: string;\n price?: number;\n subtotalPrice?: number;\n value?: number;\n tax?: number;\n shipping?: number;\n coupon?: string;\n paymentType?: string;\n shippingTier?: string;\n creativeName?: string;\n creativeSlot?: string;\n locationId?: string;\n promotionId?: string;\n promotionName?: string;\n items?: GenericContent[];\n}\n\nexport interface GenericContent {\n [key: string]: any;\n content_type?: string;\n id?: string;\n name?: string;\n sku?: string;\n brand?: string;\n variant?: string;\n coupon?: string;\n currency?: string;\n discount?: number;\n index?: number;\n value?: number;\n price?: number;\n quantity?: number;\n url?: string;\n locationId?: string;\n imageUrl?: string;\n category?: string;\n category2?: string;\n category3?: string;\n category4?: string;\n category5?: string;\n}\n\nexport interface MetricEventData {\n [key: string]: any;\n name: string;\n value: number;\n}\n\nexport const Currencies: string[] = [ 'AED', 'ARS', 'AUD', 'BDT', 'BIF', 'BOB', 'BRL', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CZK', 'DKK', 'DZD', 'EGP', 'EUR', 'GBP', 'GTQ', 'HKD', 'HNL', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KES', 'KRW', 'KWD', 'KZT', 'MAD', 'MOP', 'MXN', 'MYR', 'NGN', 'NIO', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RUB', 'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD', 'USD', 'VES', 'VND', 'ZAR' ];"],
5
+ "mappings": "AA0BO,IAAKA,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,SAAW,WAHDA,OAAA,ICbL,IAAKC,OACVA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,WAAa,YACbA,EAAA,mBAAqB,mBACrBA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,YAAc,aACdA,EAAA,UAAY,WACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SAXCA,OAAA,ICoDL,IAAKC,OACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,OAAA,IC9CL,IAAKC,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,YAAc,cACdA,EAAA,OAAS,SACTA,EAAA,KAAO,OALGA,OAAA,IAOAC,OACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,cAAgB,KAPNA,OAAA,ICaL,IAAKC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFCA,OAAA,IAKAC,OACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,UAAY,YACZA,EAAA,OAAS,SAJCA,OAAA,IAOAC,OACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,cAAgB,KAPNA,OAAA,IASAC,OACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,QAAU,UAHAA,OAAA,IC5DL,IAAKC,OACVA,EAAA,iBAAmB,mBACnBA,EAAA,kBAAoB,oBACpBA,EAAA,YAAc,cACdA,EAAA,gBAAkB,kBAGlBA,EAAA,kBAAoB,oBACpBA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,OAAS,SAITA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,aAAe,eAGfA,EAAA,uBAAyB,yBACzBA,EAAA,gCAAkC,iCAElCA,EAAA,OAAS,SACTA,EAAA,UAAY,YA1BFA,OAAA,ICqFL,IAAMC,EAAuB,CAAE,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KAAM",
6
6
  "names": ["ACCOUNT_STATUS", "DESTINATIONS", "CustomHTMLLocation", "ShopifyAppInstallStatus", "ShopifyAppSubscriptionStatus", "PLAN_BILLING_FREQUENCY", "PAYMENT_STATUS", "SUBSCRIPTION_STATUS", "PAYMENT_GATEWAY", "ADTRACKIFY_STANDARD_EVENT", "Currencies"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adtrackify/at-tracking-event-types",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",
@@ -74,4 +74,4 @@
74
74
  "author": "",
75
75
  "license": "ISC",
76
76
  "homepage": "https://bitbucket.org/eacap/at-tracking-event-types#readme"
77
- }
77
+ }
@@ -1,15 +1,22 @@
1
- import { TrackingEvent } from './tracking-events/tracking-event-type';
2
-
3
- export interface AdtrackifyEventBusEvent {
4
- eventId: string;
5
- eventType: string;
6
- eventTime: string;
7
- eventData?: object;
8
- }
9
-
10
- export interface AdtrackifyEventBusTrackingEvent extends AdtrackifyEventBusEvent {
11
- eventData: {
12
- trackingEvent: TrackingEvent;
13
- pixelId: string;
14
- };
1
+ import { MetricEvent, TrackingEvent } from './tracking-events/tracking-event-type';
2
+
3
+ export interface AdtrackifyEventBusEvent {
4
+ eventId: string;
5
+ eventType: string;
6
+ eventTime: string;
7
+ eventData?: object;
8
+ }
9
+
10
+ export interface AdtrackifyEventBusTrackingEvent extends AdtrackifyEventBusEvent {
11
+ eventData: {
12
+ trackingEvent: TrackingEvent;
13
+ pixelId: string;
14
+ };
15
+ }
16
+
17
+ export interface AdtrackifyEventBusMetricEvent extends AdtrackifyEventBusEvent{
18
+ eventData:{
19
+ metricEvent: MetricEvent;
20
+ pixelId: string;
21
+ }
15
22
  }
@@ -0,0 +1,6 @@
1
+ export enum ADTRACKIFY_EVENT_TYPE {
2
+ TRACKING = 'tracking',
3
+ METRIC = 'metric',
4
+ IDENTIFY = 'identify',
5
+ LOG = 'log',
6
+ }
@@ -19,8 +19,10 @@ export enum ADTRACKIFY_STANDARD_EVENT {
19
19
  VIEW_CART = 'view_cart',
20
20
  VIEW_CONTENT = 'view_content',
21
21
 
22
-
23
22
  //
24
23
  SELECT_SHIPPING_METHOD = 'select_shipping_method',
25
- VIRTUALIZED_VIEWED_PAYMENT_FORM = 'virtualized_viewd_payment_form'
26
- }
24
+ VIRTUALIZED_VIEWED_PAYMENT_FORM = 'virtualized_viewd_payment_form',
25
+
26
+ METRIC = 'metric',
27
+ WEB_VITAL = 'web_vital',
28
+ }
@@ -1,66 +1,66 @@
1
-
2
- export interface Destination {
3
- id: string,
4
- accountId: string,
5
- pixelId: string,
6
- destination: string;
7
- displayName?: string,
8
- enabled: boolean;
9
- configuration?: UserDestinationConfiguration,
10
- createdAt: string,
11
- updatedAt: string;
12
- }
13
-
14
- export enum DESTINATIONS {
15
- FACEBOOK = 'facebook',
16
- TIKTOK = 'tiktok',
17
- GOOGLE_ADS = 'googleAds',
18
- GOOGLE_ANALYTICS_4 = 'googleAnalytics4',
19
- HUBSPOT = 'hubspot',
20
- WEBHOOK = 'webhook',
21
- CUSTOM_HTML = 'customHTML',
22
- CUSTOM_JS = 'customJS',
23
- SNAPCHAT = 'snapchat',
24
- TWITTER = 'twitter',
25
- REDDIT = 'reddit'
26
- }
27
-
28
- export interface UserDestinationConfiguration {
29
- [ key: string ]: any;
30
- eventBlacklist?: string[];
31
- events?: EventConfiguration[];
32
- trigger?: DestinationTriggerConfiguration;
33
- }
34
-
35
- export interface DestinationTriggerConfiguration {
36
- shopify?: ShopifyTriggerConfiguration;
37
- exludeDomains?: string[];
38
- excludePages?: string[];
39
- domains?: string[];
40
- pages?: string[];
41
- }
42
-
43
- export interface ShopifyTriggerConfiguration {
44
- enabled: boolean;
45
- collections?: string[];
46
- tags?: string[];
47
- }
48
-
49
-
50
- export interface EventConfiguration {
51
- sourceEventName: string;
52
- exclude?: boolean;
53
- sample: EventSampleConfiguration;
54
- transformations?: EventTransformation[];
55
- }
56
-
57
- export interface EventTransformation {
58
- transformationEventName: string;
59
- enabled: boolean;
60
- }
61
-
62
- export interface EventSampleConfiguration {
63
- enabled: boolean;
64
- rate: number;
65
- }
66
-
1
+
2
+ export interface Destination {
3
+ id: string,
4
+ accountId: string,
5
+ pixelId: string,
6
+ destination: string;
7
+ displayName?: string,
8
+ enabled: boolean;
9
+ configuration?: UserDestinationConfiguration,
10
+ createdAt: string,
11
+ updatedAt: string;
12
+ }
13
+
14
+ export enum DESTINATIONS {
15
+ FACEBOOK = 'facebook',
16
+ TIKTOK = 'tiktok',
17
+ GOOGLE_ADS = 'googleAds',
18
+ GOOGLE_ANALYTICS_4 = 'googleAnalytics4',
19
+ HUBSPOT = 'hubspot',
20
+ WEBHOOK = 'webhook',
21
+ CUSTOM_HTML = 'customHTML',
22
+ CUSTOM_JS = 'customJS',
23
+ SNAPCHAT = 'snapchat',
24
+ TWITTER = 'twitter',
25
+ REDDIT = 'reddit'
26
+ }
27
+
28
+ export interface UserDestinationConfiguration {
29
+ [ key: string ]: any;
30
+ eventBlacklist?: string[];
31
+ events?: EventConfiguration[];
32
+ trigger?: DestinationTriggerConfiguration;
33
+ }
34
+
35
+ export interface DestinationTriggerConfiguration {
36
+ shopify?: ShopifyTriggerConfiguration;
37
+ exludeDomains?: string[];
38
+ excludePages?: string[];
39
+ domains?: string[];
40
+ pages?: string[];
41
+ }
42
+
43
+ export interface ShopifyTriggerConfiguration {
44
+ enabled: boolean;
45
+ collections?: string[];
46
+ tags?: string[];
47
+ }
48
+
49
+
50
+ export interface EventConfiguration {
51
+ sourceEventName: string;
52
+ exclude?: boolean;
53
+ sample: EventSampleConfiguration;
54
+ transformations?: EventTransformation[];
55
+ }
56
+
57
+ export interface EventTransformation {
58
+ transformationEventName: string;
59
+ enabled: boolean;
60
+ }
61
+
62
+ export interface EventSampleConfiguration {
63
+ enabled: boolean;
64
+ rate: number;
65
+ }
66
+
@@ -1,71 +1,71 @@
1
- import { Destination, UserDestinationConfiguration } from './destinations';
2
-
3
- export interface AdTrackifyFacebookDestination extends Destination {
4
- configuration: FacebookPixelConfiguration;
5
- }
6
-
7
- export interface AdTrackifyTikTokDestination extends Destination {
8
- configuration: TiktokPixelConfiguration;
9
- }
10
-
11
- export interface AdTrackifyGoogleAnalytics4Destination extends Destination {
12
- configuration: GoogleAnalytics4Configuration;
13
- }
14
-
15
- // Destination Specific configurations below
16
- export interface FacebookPixelConfiguration extends UserDestinationConfiguration {
17
- apiAccessToken?: string;
18
- enableConversionAPI: boolean;
19
- pixelId: string;
20
- }
21
-
22
- export interface TiktokPixelConfiguration extends UserDestinationConfiguration {
23
- apiAccessToken?: string;
24
- enableConversionAPI: boolean;
25
- pixelId: string;
26
- }
27
-
28
- export interface GoogleAnalytics4Configuration extends UserDestinationConfiguration {
29
- apiSecret: string;
30
- measurementId: string;
31
- }
32
-
33
- export interface GoogleAdsConfiguration extends UserDestinationConfiguration {
34
- pixelId: string;
35
- conversionID: string;
36
- }
37
-
38
- export interface HubspotPixelConfiguration extends UserDestinationConfiguration {
39
- hubspotId: string;
40
- }
41
-
42
- export interface SnapchatPixelConfiguration extends UserDestinationConfiguration {
43
- snapchatPixelId: string;
44
- }
45
-
46
- export interface TwitterPixelConfiguration extends UserDestinationConfiguration {
47
- twitterPixelId: string;
48
- }
49
-
50
- export interface WebhookConfiguration extends UserDestinationConfiguration {
51
- webhookUrl: string;
52
- }
53
-
54
- export interface CustomHTMLConfiguration extends UserDestinationConfiguration {
55
- html: string;
56
- location: CustomHTMLLocation;
57
- }
58
-
59
- export interface CustomJSConfiguration extends UserDestinationConfiguration {
60
- script: string;
61
- async: boolean;
62
- defer: boolean;
63
- location: CustomHTMLLocation;
64
- }
65
-
66
- export enum CustomHTMLLocation {
67
- HEADER = 'header',
68
- FOOTER = 'footer',
69
- BODY = 'body'
70
- }
71
-
1
+ import { Destination, UserDestinationConfiguration } from './destinations';
2
+
3
+ export interface AdTrackifyFacebookDestination extends Destination {
4
+ configuration: FacebookPixelConfiguration;
5
+ }
6
+
7
+ export interface AdTrackifyTikTokDestination extends Destination {
8
+ configuration: TiktokPixelConfiguration;
9
+ }
10
+
11
+ export interface AdTrackifyGoogleAnalytics4Destination extends Destination {
12
+ configuration: GoogleAnalytics4Configuration;
13
+ }
14
+
15
+ // Destination Specific configurations below
16
+ export interface FacebookPixelConfiguration extends UserDestinationConfiguration {
17
+ apiAccessToken?: string;
18
+ enableConversionAPI: boolean;
19
+ pixelId: string;
20
+ }
21
+
22
+ export interface TiktokPixelConfiguration extends UserDestinationConfiguration {
23
+ apiAccessToken?: string;
24
+ enableConversionAPI: boolean;
25
+ pixelId: string;
26
+ }
27
+
28
+ export interface GoogleAnalytics4Configuration extends UserDestinationConfiguration {
29
+ apiSecret: string;
30
+ measurementId: string;
31
+ }
32
+
33
+ export interface GoogleAdsConfiguration extends UserDestinationConfiguration {
34
+ pixelId: string;
35
+ conversionID: string;
36
+ }
37
+
38
+ export interface HubspotPixelConfiguration extends UserDestinationConfiguration {
39
+ hubspotId: string;
40
+ }
41
+
42
+ export interface SnapchatPixelConfiguration extends UserDestinationConfiguration {
43
+ snapchatPixelId: string;
44
+ }
45
+
46
+ export interface TwitterPixelConfiguration extends UserDestinationConfiguration {
47
+ twitterPixelId: string;
48
+ }
49
+
50
+ export interface WebhookConfiguration extends UserDestinationConfiguration {
51
+ webhookUrl: string;
52
+ }
53
+
54
+ export interface CustomHTMLConfiguration extends UserDestinationConfiguration {
55
+ html: string;
56
+ location: CustomHTMLLocation;
57
+ }
58
+
59
+ export interface CustomJSConfiguration extends UserDestinationConfiguration {
60
+ script: string;
61
+ async: boolean;
62
+ defer: boolean;
63
+ location: CustomHTMLLocation;
64
+ }
65
+
66
+ export enum CustomHTMLLocation {
67
+ HEADER = 'header',
68
+ FOOTER = 'footer',
69
+ BODY = 'body'
70
+ }
71
+
@@ -1,16 +1,16 @@
1
-
2
- export interface AddressInfo {
3
- email?: string;
4
- phone?: string;
5
- firstName?: string;
6
- lastName?: string;
7
- company?: string;
8
- address1?: string;
9
- address2?: string;
10
- city?: string;
11
- province?: string;
12
- provinceCode?: string;
13
- country?: string;
14
- countryCode?: string;
15
- zip?: string;
16
- }
1
+
2
+ export interface AddressInfo {
3
+ email?: string;
4
+ phone?: string;
5
+ firstName?: string;
6
+ lastName?: string;
7
+ company?: string;
8
+ address1?: string;
9
+ address2?: string;
10
+ city?: string;
11
+ province?: string;
12
+ provinceCode?: string;
13
+ country?: string;
14
+ countryCode?: string;
15
+ zip?: string;
16
+ }
@@ -1,7 +1,7 @@
1
- export * from './api';
2
- export * from './common';
3
- export * from './adtrackify-standard-events';
4
- export * from './third-party-event-configuration-types';
5
- export * from './tracking-events/tracking-event-type';
6
- export * from './adtrackify-event-bus-event';
1
+ export * from './api';
2
+ export * from './common';
3
+ export * from './adtrackify-standard-events';
4
+ export * from './third-party-event-configuration-types';
5
+ export * from './tracking-events/tracking-event-type';
6
+ export * from './adtrackify-event-bus-event';
7
7
  export * from './tracking-events';
@@ -1,4 +1,4 @@
1
- export * from './tracking-event-type';
2
- export * from './tracking-event-context';
3
- export * from './tracking-event-identity';
4
-
1
+ export * from './tracking-event-type';
2
+ export * from './tracking-event-context';
3
+ export * from './tracking-event-identity';
4
+
@@ -17,6 +17,7 @@ export interface TrackingEventContextProperties {
17
17
  ipv6Address?: string;
18
18
  sessionId?: string;
19
19
  shopify?: ShopifyInfo;
20
+ adBlockDetected?: boolean;
20
21
  }
21
22
 
22
23
  export interface AdClickInfo {
@@ -48,4 +49,4 @@ export interface ShopifyInfo {
48
49
  tags?: string[];
49
50
  }
50
51
 
51
- export type DeviceInfo = IResult;
52
+ export type DeviceInfo = IResult;
@@ -1,21 +1,21 @@
1
- import { AddressInfo } from '../common/address';
2
-
3
- export interface TrackingEventIdentity {
4
- identityId?: string;
5
- anonymousId?: string;
6
- traits?: TrackingEventIdentityTraits;
7
- }
8
-
9
- export interface TrackingEventIdentityTraits {
10
- [ key: string ]: any;
11
- userId?: string;
12
- gender?: string;
13
- dob?: string;
14
- phone?: string;
15
- id?: string;
16
- firstName?: string;
17
- lastName?: string;
18
- email?: string;
19
- address?: AddressInfo;
20
- addresses?: AddressInfo[];
1
+ import { AddressInfo } from '../common/address';
2
+
3
+ export interface TrackingEventIdentity {
4
+ identityId?: string;
5
+ anonymousId?: string;
6
+ traits?: TrackingEventIdentityTraits;
7
+ }
8
+
9
+ export interface TrackingEventIdentityTraits {
10
+ [ key: string ]: any;
11
+ userId?: string;
12
+ gender?: string;
13
+ dob?: string;
14
+ phone?: string;
15
+ id?: string;
16
+ firstName?: string;
17
+ lastName?: string;
18
+ email?: string;
19
+ address?: AddressInfo;
20
+ addresses?: AddressInfo[];
21
21
  }
@@ -1,24 +1,32 @@
1
1
  import { ADTRACKIFY_STANDARD_EVENT } from '../adtrackify-standard-events';
2
+ import { ADTRACKIFY_EVENT_TYPE } from '../adtrackify-event-types'
2
3
  import { AddressInfo } from '../common/address';
3
4
  import { TrackingEventContext } from './tracking-event-context';
4
5
  import { TrackingEventIdentity } from './tracking-event-identity';
5
6
 
6
- export interface TrackingEvent {
7
+ export interface Event {
7
8
  id: string;
8
- type: string;
9
+ type: ADTRACKIFY_EVENT_TYPE;
9
10
  name: ADTRACKIFY_STANDARD_EVENT;
10
11
  pixelId: string;
12
+ sentAtEpoch?: number;
13
+ collectedAt?: string;
14
+ version: string;
11
15
  context?: TrackingEventContext;
16
+ }
17
+
18
+ export interface TrackingEvent extends Event {
12
19
  identity?: TrackingEventIdentity;
13
20
  data?: TrackingEventData;
14
21
  testCode?: string;
15
- sentAtEpoch?: number;
16
- collectedAt?: string;
17
- version: string;
22
+ }
23
+
24
+ export interface MetricEvent extends Event {
25
+ data: MetricEventData;
18
26
  }
19
27
 
20
28
  export interface TrackingEventData {
21
- [ key: string ]: any;
29
+ [key: string]: any;
22
30
  firstName?: string;
23
31
  lastName?: string;
24
32
  email?: string;
@@ -45,7 +53,7 @@ export interface TrackingEventData {
45
53
  }
46
54
 
47
55
  export interface GenericContent {
48
- [ key: string ]: any;
56
+ [key: string]: any;
49
57
  content_type?: string;
50
58
  id?: string;
51
59
  name?: string;
@@ -69,6 +77,10 @@ export interface GenericContent {
69
77
  category5?: string;
70
78
  }
71
79
 
80
+ export interface MetricEventData {
81
+ [key: string]: any;
82
+ name: string;
83
+ value: number;
84
+ }
72
85
 
73
- export const Currencies: string[] = [ 'AED', 'ARS', 'AUD', 'BDT', 'BIF', 'BOB', 'BRL', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CZK', 'DKK', 'DZD', 'EGP', 'EUR', 'GBP', 'GTQ', 'HKD', 'HNL', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KES', 'KRW', 'KWD', 'KZT', 'MAD', 'MOP', 'MXN', 'MYR', 'NGN', 'NIO', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RUB', 'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD', 'USD', 'VES', 'VND', 'ZAR' ];
74
-
86
+ export const Currencies: string[] = [ 'AED', 'ARS', 'AUD', 'BDT', 'BIF', 'BOB', 'BRL', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CZK', 'DKK', 'DZD', 'EGP', 'EUR', 'GBP', 'GTQ', 'HKD', 'HNL', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KES', 'KRW', 'KWD', 'KZT', 'MAD', 'MOP', 'MXN', 'MYR', 'NGN', 'NIO', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RUB', 'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD', 'USD', 'VES', 'VND', 'ZAR' ];