Often you may want to personalize a user's experience on their very first page visit, before they have a Lytics cookie and user profile created in our system.
You can do this Async by passing query parameters in the URL Contains
Here are two examples of how you can do this in JS with a url referral:
```
// Option 1:
// If using the UI for campaigns, have someone add the manualTrigger
// display option override and add the following to your website:
if (document.referrer === 'https://www.google.com/') {
pathfora.triggerWidgets(['widget-id']);
}
```
```
// Option 2:
// If not using the SDK, use the following code:
var module = new pathfora.Message({
id: 'referral-trigger',
layout: 'modal',
msg: 'Here is a modal',
});
if (document.referrer === 'https://www.google.com/') {
pathfora.initializeWidgets([module]);
}
```
Comments
0 comments
Please sign in to leave a comment.