Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

Commit f6bb231

Browse files
committed
Add example code
1 parent f41db9a commit f6bb231

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

source/includes/_embed2.md.erb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,14 @@ This action requires the `developer_proactive` feature flag to be turned on.
384384
Deletes the `chatter` used to fetch conversation logs for an end-user from storage. When a user opens a new Chat window a new `chatter` will be generated.
385385

386386
#### evaluateCampaignConditions
387+
388+
```js
389+
window.adaEmbed.evaluateCampaignConditions({
390+
ignoreStatus: false,
391+
ignoreFrequency: false
392+
});
393+
```
394+
387395
`evaluateCampaignConditions(options: object): Promise<void>;`
388396

389397
This is similar to `triggerCampaign` - however, instead of triggering a specific Campaign, `evaluateCampaignConditions` evaluates the trigger conditions of the Campaigns in priority order and triggers the first Campaign (if any) whose conditions are matched.
@@ -456,6 +464,14 @@ Removes Embed2 from your page.
456464
Can be used to programatically open / close the Chat window. This method cannot be used with the `parentElement` option.
457465

458466
#### triggerCampaign
467+
468+
```js
469+
window.adaEmbed.triggerCampaign("Example_Campaign", {
470+
ignoreStatus: false,
471+
ignoreFrequency: false
472+
});
473+
```
474+
459475
`triggerCampaign(campaignKey: string, options: object): Promise<void>;`
460476

461477
Used to trigger the proactive Campaign with key `campaignKey`.
@@ -467,6 +483,14 @@ An optional second argument `options` can be passed. These options may be helpfu
467483
This action requires the Ada Engage Campaigns feature.
468484

469485
#### trackEvent
486+
487+
```js
488+
window.adaEmbed.trackEvent("Example_Event", 2, {
489+
productId: "a1b2c3",
490+
customerSegment: "premium"
491+
});
492+
```
493+
470494
`trackEvent(eventKey: string, value?: number, meta?: object)`
471495

472496
Used to track an Event. The arguments to this function are:

0 commit comments

Comments
 (0)