@segment/analytics-browser-actions-adobe-target 1.0.0 → 1.3.0
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/.eslintcache +1 -0
- package/dist/cjs/generated-types.d.ts +7 -0
- package/dist/cjs/generated-types.js +3 -0
- package/dist/cjs/generated-types.js.map +1 -0
- package/dist/cjs/index.d.ts +13 -0
- package/dist/cjs/index.js +69 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/init-script.d.ts +1 -0
- package/dist/cjs/init-script.js +16 -0
- package/dist/cjs/init-script.js.map +1 -0
- package/dist/cjs/trackEvent/generated-types.d.ts +8 -0
- package/dist/cjs/trackEvent/generated-types.js +3 -0
- package/dist/cjs/trackEvent/generated-types.js.map +1 -0
- package/dist/cjs/trackEvent/index.d.ts +6 -0
- package/dist/cjs/trackEvent/index.js +63 -0
- package/dist/cjs/trackEvent/index.js.map +1 -0
- package/dist/cjs/triggerView/generated-types.d.ts +8 -0
- package/dist/cjs/triggerView/generated-types.js +3 -0
- package/dist/cjs/triggerView/generated-types.js.map +1 -0
- package/dist/cjs/triggerView/index.d.ts +6 -0
- package/dist/cjs/triggerView/index.js +55 -0
- package/dist/cjs/triggerView/index.js.map +1 -0
- package/dist/cjs/types.d.ts +8 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/upsertProfile/generated-types.d.ts +6 -0
- package/dist/cjs/upsertProfile/generated-types.js +3 -0
- package/dist/cjs/upsertProfile/generated-types.js.map +1 -0
- package/dist/cjs/upsertProfile/index.d.ts +6 -0
- package/dist/cjs/upsertProfile/index.js +46 -0
- package/dist/cjs/upsertProfile/index.js.map +1 -0
- package/dist/cjs/utils.d.ts +8 -0
- package/dist/cjs/utils.js +30 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/generated-types.d.ts +7 -0
- package/dist/esm/generated-types.js +2 -0
- package/dist/esm/generated-types.js.map +1 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +65 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/init-script.d.ts +1 -0
- package/dist/esm/init-script.js +12 -0
- package/dist/esm/init-script.js.map +1 -0
- package/dist/esm/trackEvent/generated-types.d.ts +8 -0
- package/dist/esm/trackEvent/generated-types.js +2 -0
- package/dist/esm/trackEvent/generated-types.js.map +1 -0
- package/dist/esm/trackEvent/index.d.ts +6 -0
- package/dist/esm/trackEvent/index.js +61 -0
- package/dist/esm/trackEvent/index.js.map +1 -0
- package/dist/esm/triggerView/generated-types.d.ts +8 -0
- package/dist/esm/triggerView/generated-types.js +2 -0
- package/dist/esm/triggerView/generated-types.js.map +1 -0
- package/dist/esm/triggerView/index.d.ts +6 -0
- package/dist/esm/triggerView/index.js +53 -0
- package/dist/esm/triggerView/index.js.map +1 -0
- package/dist/esm/types.d.ts +8 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/upsertProfile/generated-types.d.ts +6 -0
- package/dist/esm/upsertProfile/generated-types.js +2 -0
- package/dist/esm/upsertProfile/generated-types.js.map +1 -0
- package/dist/esm/upsertProfile/index.d.ts +6 -0
- package/dist/esm/upsertProfile/index.js +44 -0
- package/dist/esm/upsertProfile/index.js.map +1 -0
- package/dist/esm/utils.d.ts +8 -0
- package/dist/esm/utils.js +23 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +4 -3
package/.eslintcache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/generated-types.ts":"1","/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/index.ts":"2","/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/init-script.ts":"3","/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/types.ts":"4","/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/utils.ts":"5"},{"size":964,"mtime":1686339431090,"results":"6","hashOfConfig":"7"},{"size":2759,"mtime":1687379681959,"results":"8","hashOfConfig":"7"},{"size":548,"mtime":1687379681959,"results":"9","hashOfConfig":"7"},{"size":107,"mtime":1687379025313,"results":"10","hashOfConfig":"7"},{"size":752,"mtime":1686339431090,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1anjglf",{"filePath":"14","messages":"15","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/generated-types.ts",[],"/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/index.ts",[],"/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/init-script.ts",[],"/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/types.ts",[],"/home/kaari/action-destinations/packages/browser-destinations/destinations/adobe-target/src/utils.ts",[]]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../src/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Settings } from './generated-types';
|
|
2
|
+
import type { BrowserDestinationDefinition } from '@segment/browser-destination-runtime/types';
|
|
3
|
+
import { Adobe } from './types';
|
|
4
|
+
declare global {
|
|
5
|
+
interface Window {
|
|
6
|
+
adobe: Adobe;
|
|
7
|
+
targetPageParams: Function;
|
|
8
|
+
pageParams: Object;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare const destination: BrowserDestinationDefinition<Settings, Adobe>;
|
|
12
|
+
declare const _default: import("@segment/browser-destination-runtime/types").PluginFactory;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.destination = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const shim_1 = require("@segment/browser-destination-runtime/shim");
|
|
6
|
+
const init_script_1 = require("./init-script");
|
|
7
|
+
const upsertProfile_1 = tslib_1.__importDefault(require("./upsertProfile"));
|
|
8
|
+
const triggerView_1 = tslib_1.__importDefault(require("./triggerView"));
|
|
9
|
+
const trackEvent_1 = tslib_1.__importDefault(require("./trackEvent"));
|
|
10
|
+
exports.destination = {
|
|
11
|
+
name: 'Adobe Target Web',
|
|
12
|
+
slug: 'actions-adobe-target-web',
|
|
13
|
+
mode: 'device',
|
|
14
|
+
settings: {
|
|
15
|
+
client_code: {
|
|
16
|
+
label: 'Client Code',
|
|
17
|
+
description: 'Your Adobe Target client code. To find your client code in Adobe Target, navigate to **Administration > Implementation**. The client code is shown at the top under Account Details.',
|
|
18
|
+
required: true,
|
|
19
|
+
type: 'string'
|
|
20
|
+
},
|
|
21
|
+
admin_number: {
|
|
22
|
+
label: 'Admin number',
|
|
23
|
+
description: 'Your Adobe Target admin number. To find your admin number, please follow the instructions in [Adobe Docs](https://experienceleague.adobe.com/docs/target/using/implement-target/client-side/at-js-implementation/deploy-at-js/implementing-target-without-a-tag-manager.html).',
|
|
24
|
+
required: true,
|
|
25
|
+
type: 'string'
|
|
26
|
+
},
|
|
27
|
+
version: {
|
|
28
|
+
label: 'ATJS Version',
|
|
29
|
+
description: 'The version of ATJS to use. Defaults to 2.8.0.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
choices: [
|
|
32
|
+
{
|
|
33
|
+
value: '2.8.0',
|
|
34
|
+
label: '2.8.0'
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
default: '2.8.0',
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
mbox_name: {
|
|
41
|
+
label: 'Mbox Name',
|
|
42
|
+
description: 'The name of the Adobe Target mbox to use. Defaults to `target-global-mbox`.',
|
|
43
|
+
type: 'string',
|
|
44
|
+
required: true,
|
|
45
|
+
default: 'target-global-mbox'
|
|
46
|
+
},
|
|
47
|
+
cookie_domain: {
|
|
48
|
+
label: 'Cookie Domain',
|
|
49
|
+
description: "The domain from which you serve the mbox. Adobe Target recommends setting this value to your company's top-level domain.",
|
|
50
|
+
type: 'string',
|
|
51
|
+
required: true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
initialize: async ({ settings }, deps) => {
|
|
55
|
+
init_script_1.initScript(settings);
|
|
56
|
+
const targetUrl = 'testandtarget.omniture.com/admin/rest/v1/libraries/atjs/download';
|
|
57
|
+
const atjsUrl = `https://admin${settings.admin_number}.${targetUrl}?client=${settings.client_code}&version=${settings.version}`;
|
|
58
|
+
await deps.loadScript(atjsUrl);
|
|
59
|
+
await deps.resolveWhen(() => Object.prototype.hasOwnProperty.call(window, 'adobe'), 100);
|
|
60
|
+
return window.adobe;
|
|
61
|
+
},
|
|
62
|
+
actions: {
|
|
63
|
+
upsertProfile: upsertProfile_1.default,
|
|
64
|
+
triggerView: triggerView_1.default,
|
|
65
|
+
trackEvent: trackEvent_1.default
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.default = shim_1.browserDestination(exports.destination);
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAEA,oEAA8E;AAE9E,+CAA0C;AAE1C,4EAA2C;AAC3C,wEAAuC;AACvC,sEAAqC;AAUxB,QAAA,WAAW,GAAkD;IACxE,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,QAAQ;IAEd,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,sLAAsL;YACxL,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;SACf;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,gRAAgR;YAClR,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;SACf;QACD,OAAO,EAAE;YACP,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,gDAAgD;YAC7D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP;oBACE,KAAK,EAAE,OAAO;oBACd,KAAK,EAAE,OAAO;iBACf;aACF;YACD,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,IAAI;SACf;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,6EAA6E;YAC1F,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,oBAAoB;SAC9B;QACD,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,WAAW,EACT,0HAA0H;YAC5H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;KACF;IAED,UAAU,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE;QACvC,wBAAU,CAAC,QAAQ,CAAC,CAAA;QAEpB,MAAM,SAAS,GAAG,kEAAkE,CAAA;QACpF,MAAM,OAAO,GAAG,gBAAgB,QAAQ,CAAC,YAAY,IAAI,SAAS,WAAW,QAAQ,CAAC,WAAW,YAAY,QAAQ,CAAC,OAAO,EAAE,CAAA;QAE/H,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAC9B,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAA;QACxF,OAAO,MAAM,CAAC,KAAK,CAAA;IACrB,CAAC;IAED,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;QACb,WAAW,EAAX,qBAAW;QACX,UAAU,EAAV,oBAAU;KACX;CACF,CAAA;AAED,kBAAe,yBAAkB,CAAC,mBAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function initScript(settings: any): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initScript = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
function initScript(settings) {
|
|
6
|
+
window.pageParams = {};
|
|
7
|
+
window.targetGlobalSettings = {
|
|
8
|
+
cookieDomain: settings.cookie_domain,
|
|
9
|
+
enabled: true
|
|
10
|
+
};
|
|
11
|
+
window.targetPageParams = function () {
|
|
12
|
+
return utils_1.getPageParams();
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.initScript = initScript;
|
|
16
|
+
//# sourceMappingURL=init-script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-script.js","sourceRoot":"","sources":["../../src/init-script.ts"],"names":[],"mappings":";;;AAGA,mCAAuC;AAEvC,SAAgB,UAAU,CAAC,QAAQ;IACjC,MAAM,CAAC,UAAU,GAAG,EAAE,CAAA;IACtB,MAAM,CAAC,oBAAoB,GAAG;QAC5B,YAAY,EAAE,QAAQ,CAAC,aAAa;QACpC,OAAO,EAAE,IAAI;KACd,CAAA;IAID,MAAM,CAAC,gBAAgB,GAAG;QACxB,OAAO,qBAAa,EAAE,CAAA;IACxB,CAAC,CAAA;AACH,CAAC;AAZD,gCAYC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/trackEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
import { Adobe } from '../types';
|
|
5
|
+
declare const action: BrowserActionDefinition<Settings, Adobe, Payload>;
|
|
6
|
+
export default action;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../utils");
|
|
4
|
+
const TARGET_EVENT_TYPE = 'display';
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Track Event',
|
|
7
|
+
description: 'Send user actions, such as clicks and conversions, to Adobe Target.',
|
|
8
|
+
platform: 'web',
|
|
9
|
+
defaultSubscription: 'type = "track"',
|
|
10
|
+
fields: {
|
|
11
|
+
type: {
|
|
12
|
+
label: 'Event Type',
|
|
13
|
+
description: 'The event type. Please ensure the type entered here is registered and available.',
|
|
14
|
+
type: 'string',
|
|
15
|
+
default: TARGET_EVENT_TYPE
|
|
16
|
+
},
|
|
17
|
+
eventName: {
|
|
18
|
+
label: 'Event Name',
|
|
19
|
+
description: 'This will be sent to Adobe Target as an event parameter called "event_name".',
|
|
20
|
+
type: 'string',
|
|
21
|
+
default: {
|
|
22
|
+
'@path': '$.event'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
properties: {
|
|
26
|
+
label: 'Event Parameters',
|
|
27
|
+
description: 'Parameters specific to the event.',
|
|
28
|
+
type: 'object',
|
|
29
|
+
default: {
|
|
30
|
+
'@path': '$.properties'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
userId: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'A user’s unique visitor ID. Setting an Mbox 3rd Party ID allows for updates via the Adobe Target Cloud Mode Destination. For more information, please see our Adobe Target Destination documentation.',
|
|
36
|
+
label: 'Mbox 3rd Party ID',
|
|
37
|
+
default: {
|
|
38
|
+
'@if': {
|
|
39
|
+
exists: { '@path': '$.userId' },
|
|
40
|
+
then: { '@path': '$.userId' },
|
|
41
|
+
else: { '@path': '$.anonymousId' }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
perform: (Adobe, event) => {
|
|
47
|
+
const payload = event.payload;
|
|
48
|
+
utils_1.setMbox3rdPartyId(payload.userId);
|
|
49
|
+
const event_params = {
|
|
50
|
+
...utils_1.serializeProperties(payload.properties),
|
|
51
|
+
event_name: payload.eventName
|
|
52
|
+
};
|
|
53
|
+
const params = {
|
|
54
|
+
mbox: event.settings.mbox_name,
|
|
55
|
+
preventDefault: true,
|
|
56
|
+
params: event_params,
|
|
57
|
+
type: payload.type
|
|
58
|
+
};
|
|
59
|
+
Adobe.target.trackEvent(params);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.default = action;
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/trackEvent/index.ts"],"names":[],"mappings":";;AAIA,oCAAiE;AAKjE,MAAM,iBAAiB,GAAG,SAAS,CAAA;AAEnC,MAAM,MAAM,GAAsD;IAChE,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,qEAAqE;IAClF,QAAQ,EAAE,KAAK;IACf,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,kFAAkF;YAC/F,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,iBAAiB;SAC3B;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,8EAA8E;YAC3F,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uMAAuM;YACzM,KAAK,EAAE,mBAAmB;YAC1B,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;KACF;IACD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACxB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC7B,yBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAEjC,MAAM,YAAY,GAAG;YACnB,GAAG,2BAAmB,CAAC,OAAO,CAAC,UAAU,CAAC;YAC1C,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B,CAAA;QAED,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS;YAC9B,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,YAAY;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAAA;QAED,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IACjC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/triggerView/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
import { Adobe } from '../types';
|
|
5
|
+
declare const action: BrowserActionDefinition<Settings, Adobe, Payload>;
|
|
6
|
+
export default action;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../utils");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Trigger View',
|
|
6
|
+
defaultSubscription: 'type = "page"',
|
|
7
|
+
description: 'Send page-level data to Adobe Target.',
|
|
8
|
+
platform: 'web',
|
|
9
|
+
fields: {
|
|
10
|
+
viewName: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'Name of the view or page.',
|
|
13
|
+
label: 'View Name',
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.name'
|
|
16
|
+
},
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
pageParameters: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
description: 'Parameters specific to the view or page.',
|
|
22
|
+
label: 'Page Parameters',
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.properties'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
sendNotification: {
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
description: 'By default, notifications are sent to the Adobe Target backend for incrementing impression count. If false, notifications are not sent for incrementing impression count. ',
|
|
30
|
+
label: 'Send Notifications to Adobe Target.',
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
userId: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'A user’s unique visitor ID. Setting an Mbox 3rd Party ID allows for updates via the Adobe Target Cloud Mode Destination. For more information, please see our Adobe Target Destination documentation.',
|
|
36
|
+
label: 'Mbox 3rd Party ID',
|
|
37
|
+
default: {
|
|
38
|
+
'@if': {
|
|
39
|
+
exists: { '@path': '$.userId' },
|
|
40
|
+
then: { '@path': '$.userId' },
|
|
41
|
+
else: { '@path': '$.anonymousId' }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
perform: (Adobe, event) => {
|
|
47
|
+
const sendNotification = event.payload.sendNotification;
|
|
48
|
+
const pageParams = event.payload.pageParameters;
|
|
49
|
+
utils_1.setMbox3rdPartyId(event.payload.userId);
|
|
50
|
+
utils_1.setPageParams({ page: { ...pageParams } });
|
|
51
|
+
Adobe.target.triggerView(event.payload.viewName, { page: sendNotification });
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.default = action;
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/triggerView/index.ts"],"names":[],"mappings":";;AAIA,oCAA2D;AAE3D,MAAM,MAAM,GAAsD;IAChE,KAAK,EAAE,cAAc;IACrB,mBAAmB,EAAE,eAAe;IACpC,WAAW,EAAE,uCAAuC;IACpD,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,2BAA2B;YACxC,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE;gBACP,OAAO,EAAE,QAAQ;aAClB;YACD,QAAQ,EAAE,IAAI;SACf;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0CAA0C;YACvD,KAAK,EAAE,iBAAiB;YACxB,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,SAAS;YACf,WAAW,EACT,6KAA6K;YAC/K,KAAK,EAAE,qCAAqC;YAC5C,OAAO,EAAE,IAAI;SACd;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uMAAuM;YACzM,KAAK,EAAE,mBAAmB;YAC1B,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;KACF;IACD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACxB,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAA;QACvD,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,cAAc,CAAA;QAE/C,yBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAOvC,qBAAa,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,UAAU,EAAE,EAAE,CAAC,CAAA;QAE1C,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAA;IAC9E,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/upsertProfile/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import { Adobe } from '../types';
|
|
4
|
+
import type { Payload } from './generated-types';
|
|
5
|
+
declare const action: BrowserActionDefinition<Settings, Adobe, Payload>;
|
|
6
|
+
export default action;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../utils");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Upsert Profile',
|
|
6
|
+
description: 'Create or update a user profile in Adobe Target.',
|
|
7
|
+
platform: 'web',
|
|
8
|
+
defaultSubscription: 'type = "identify"',
|
|
9
|
+
fields: {
|
|
10
|
+
userId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'A user’s unique visitor ID. Setting an Mbox 3rd Party ID allows for updates via the Adobe Target Cloud Mode Destination. For more information, please see our Adobe Target Destination documentation.',
|
|
13
|
+
label: 'Mbox 3rd Party ID',
|
|
14
|
+
default: {
|
|
15
|
+
'@if': {
|
|
16
|
+
exists: { '@path': '$.userId' },
|
|
17
|
+
then: { '@path': '$.userId' },
|
|
18
|
+
else: { '@path': '$.anonymousId' }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
traits: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
description: 'Profile parameters specific to a user. Please note, Adobe recommends that PII is hashed prior to sending to Adobe.',
|
|
25
|
+
label: 'Profile Attributes',
|
|
26
|
+
defaultObjectUI: 'keyvalue'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
perform: (Adobe, event) => {
|
|
30
|
+
utils_1.setMbox3rdPartyId(event.payload.userId);
|
|
31
|
+
utils_1.setPageParams({
|
|
32
|
+
profile: {
|
|
33
|
+
...event.payload.traits
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const params = {
|
|
37
|
+
mbox: event.settings.mbox_name,
|
|
38
|
+
params: {
|
|
39
|
+
event_name: 'profile_update'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
Adobe.target.trackEvent(params);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.default = action;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/upsertProfile/index.ts"],"names":[],"mappings":";;AAIA,oCAA2D;AAE3D,MAAM,MAAM,GAAsD;IAChE,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,kDAAkD;IAC/D,QAAQ,EAAE,KAAK;IACf,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uMAAuM;YACzM,KAAK,EAAE,mBAAmB;YAC1B,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,oHAAoH;YACtH,KAAK,EAAE,oBAAoB;YAC3B,eAAe,EAAE,UAAU;SAC5B;KACF;IACD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QAMxB,yBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAOvC,qBAAa,CAAC;YACZ,OAAO,EAAE;gBACP,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM;aACxB;SACF,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS;YAC9B,MAAM,EAAE;gBACN,UAAU,EAAE,gBAAgB;aAC7B;SACF,CAAA;QAED,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IACjC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function getPageParams(): Object;
|
|
2
|
+
export declare function setPageParams(params: any): any;
|
|
3
|
+
export declare function setMbox3rdPartyId(id: any): void;
|
|
4
|
+
export declare function serializeProperties(props: {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
} | undefined): {
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serializeProperties = exports.setMbox3rdPartyId = exports.setPageParams = exports.getPageParams = void 0;
|
|
4
|
+
function getPageParams() {
|
|
5
|
+
return window.pageParams;
|
|
6
|
+
}
|
|
7
|
+
exports.getPageParams = getPageParams;
|
|
8
|
+
function setPageParams(params) {
|
|
9
|
+
return (window.pageParams = { ...window.pageParams, ...params });
|
|
10
|
+
}
|
|
11
|
+
exports.setPageParams = setPageParams;
|
|
12
|
+
function setMbox3rdPartyId(id) {
|
|
13
|
+
setPageParams({ mbox3rdPartyId: id });
|
|
14
|
+
}
|
|
15
|
+
exports.setMbox3rdPartyId = setMbox3rdPartyId;
|
|
16
|
+
function serializeProperties(props) {
|
|
17
|
+
if (props === undefined) {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
const serialized = {};
|
|
21
|
+
for (const key in props) {
|
|
22
|
+
serialized[key] = props[key];
|
|
23
|
+
if (Array.isArray(props[key])) {
|
|
24
|
+
serialized[key] = JSON.stringify(props[key]);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return serialized;
|
|
28
|
+
}
|
|
29
|
+
exports.serializeProperties = serializeProperties;
|
|
30
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAGA,SAAgB,aAAa;IAC3B,OAAO,MAAM,CAAC,UAAU,CAAA;AAC1B,CAAC;AAFD,sCAEC;AAED,SAAgB,aAAa,CAAC,MAAM;IAClC,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,EAAE,GAAG,MAAM,CAAC,UAAU,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;AAClE,CAAC;AAFD,sCAEC;AAED,SAAgB,iBAAiB,CAAC,EAAE;IAClC,aAAa,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAA;AACvC,CAAC;AAFD,8CAEC;AAGD,SAAgB,mBAAmB,CAAC,KAA6C;IAC/E,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,EAAE,CAAA;KACV;IAED,MAAM,UAAU,GAA+B,EAAE,CAAA;IAEjD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;QAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;YAC7B,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;SAC7C;KACF;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AAfD,kDAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../src/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Settings } from './generated-types';
|
|
2
|
+
import type { BrowserDestinationDefinition } from '@segment/browser-destination-runtime/types';
|
|
3
|
+
import { Adobe } from './types';
|
|
4
|
+
declare global {
|
|
5
|
+
interface Window {
|
|
6
|
+
adobe: Adobe;
|
|
7
|
+
targetPageParams: Function;
|
|
8
|
+
pageParams: Object;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare const destination: BrowserDestinationDefinition<Settings, Adobe>;
|
|
12
|
+
declare const _default: import("@segment/browser-destination-runtime/types").PluginFactory;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { browserDestination } from '@segment/browser-destination-runtime/shim';
|
|
2
|
+
import { initScript } from './init-script';
|
|
3
|
+
import upsertProfile from './upsertProfile';
|
|
4
|
+
import triggerView from './triggerView';
|
|
5
|
+
import trackEvent from './trackEvent';
|
|
6
|
+
export const destination = {
|
|
7
|
+
name: 'Adobe Target Web',
|
|
8
|
+
slug: 'actions-adobe-target-web',
|
|
9
|
+
mode: 'device',
|
|
10
|
+
settings: {
|
|
11
|
+
client_code: {
|
|
12
|
+
label: 'Client Code',
|
|
13
|
+
description: 'Your Adobe Target client code. To find your client code in Adobe Target, navigate to **Administration > Implementation**. The client code is shown at the top under Account Details.',
|
|
14
|
+
required: true,
|
|
15
|
+
type: 'string'
|
|
16
|
+
},
|
|
17
|
+
admin_number: {
|
|
18
|
+
label: 'Admin number',
|
|
19
|
+
description: 'Your Adobe Target admin number. To find your admin number, please follow the instructions in [Adobe Docs](https://experienceleague.adobe.com/docs/target/using/implement-target/client-side/at-js-implementation/deploy-at-js/implementing-target-without-a-tag-manager.html).',
|
|
20
|
+
required: true,
|
|
21
|
+
type: 'string'
|
|
22
|
+
},
|
|
23
|
+
version: {
|
|
24
|
+
label: 'ATJS Version',
|
|
25
|
+
description: 'The version of ATJS to use. Defaults to 2.8.0.',
|
|
26
|
+
type: 'string',
|
|
27
|
+
choices: [
|
|
28
|
+
{
|
|
29
|
+
value: '2.8.0',
|
|
30
|
+
label: '2.8.0'
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
default: '2.8.0',
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
mbox_name: {
|
|
37
|
+
label: 'Mbox Name',
|
|
38
|
+
description: 'The name of the Adobe Target mbox to use. Defaults to `target-global-mbox`.',
|
|
39
|
+
type: 'string',
|
|
40
|
+
required: true,
|
|
41
|
+
default: 'target-global-mbox'
|
|
42
|
+
},
|
|
43
|
+
cookie_domain: {
|
|
44
|
+
label: 'Cookie Domain',
|
|
45
|
+
description: "The domain from which you serve the mbox. Adobe Target recommends setting this value to your company's top-level domain.",
|
|
46
|
+
type: 'string',
|
|
47
|
+
required: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
initialize: async ({ settings }, deps) => {
|
|
51
|
+
initScript(settings);
|
|
52
|
+
const targetUrl = 'testandtarget.omniture.com/admin/rest/v1/libraries/atjs/download';
|
|
53
|
+
const atjsUrl = `https://admin${settings.admin_number}.${targetUrl}?client=${settings.client_code}&version=${settings.version}`;
|
|
54
|
+
await deps.loadScript(atjsUrl);
|
|
55
|
+
await deps.resolveWhen(() => Object.prototype.hasOwnProperty.call(window, 'adobe'), 100);
|
|
56
|
+
return window.adobe;
|
|
57
|
+
},
|
|
58
|
+
actions: {
|
|
59
|
+
upsertProfile,
|
|
60
|
+
triggerView,
|
|
61
|
+
trackEvent
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export default browserDestination(destination);
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAA;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,UAAU,MAAM,cAAc,CAAA;AAUrC,MAAM,CAAC,MAAM,WAAW,GAAkD;IACxE,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,QAAQ;IAEd,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,sLAAsL;YACxL,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;SACf;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,gRAAgR;YAClR,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;SACf;QACD,OAAO,EAAE;YACP,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,gDAAgD;YAC7D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP;oBACE,KAAK,EAAE,OAAO;oBACd,KAAK,EAAE,OAAO;iBACf;aACF;YACD,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,IAAI;SACf;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,6EAA6E;YAC1F,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,oBAAoB;SAC9B;QACD,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,WAAW,EACT,0HAA0H;YAC5H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;KACF;IAED,UAAU,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE;QACvC,UAAU,CAAC,QAAQ,CAAC,CAAA;QAEpB,MAAM,SAAS,GAAG,kEAAkE,CAAA;QACpF,MAAM,OAAO,GAAG,gBAAgB,QAAQ,CAAC,YAAY,IAAI,SAAS,WAAW,QAAQ,CAAC,WAAW,YAAY,QAAQ,CAAC,OAAO,EAAE,CAAA;QAE/H,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAC9B,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAA;QACxF,OAAO,MAAM,CAAC,KAAK,CAAA;IACrB,CAAC;IAED,OAAO,EAAE;QACP,aAAa;QACb,WAAW;QACX,UAAU;KACX;CACF,CAAA;AAED,eAAe,kBAAkB,CAAC,WAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function initScript(settings: any): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getPageParams } from './utils';
|
|
2
|
+
export function initScript(settings) {
|
|
3
|
+
window.pageParams = {};
|
|
4
|
+
window.targetGlobalSettings = {
|
|
5
|
+
cookieDomain: settings.cookie_domain,
|
|
6
|
+
enabled: true
|
|
7
|
+
};
|
|
8
|
+
window.targetPageParams = function () {
|
|
9
|
+
return getPageParams();
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=init-script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-script.js","sourceRoot":"","sources":["../../src/init-script.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC,MAAM,UAAU,UAAU,CAAC,QAAQ;IACjC,MAAM,CAAC,UAAU,GAAG,EAAE,CAAA;IACtB,MAAM,CAAC,oBAAoB,GAAG;QAC5B,YAAY,EAAE,QAAQ,CAAC,aAAa;QACpC,OAAO,EAAE,IAAI;KACd,CAAA;IAID,MAAM,CAAC,gBAAgB,GAAG;QACxB,OAAO,aAAa,EAAE,CAAA;IACxB,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/trackEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
import { Adobe } from '../types';
|
|
5
|
+
declare const action: BrowserActionDefinition<Settings, Adobe, Payload>;
|
|
6
|
+
export default action;
|