Skip to content

Commit

Permalink
fix: add contextData as first property
Browse files Browse the repository at this point in the history
  • Loading branch information
@dustin.hirten committed Oct 9, 2023
1 parent 46c0b42 commit 1abf6e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/journeys/post-qualification.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const epilotData = Object.fromEntries(epilotUrlSearchParams.entries())
Then, we need to pass the epilotData variable to the journeys option key contextData like:

```html
__epilot.init([{journeyId: "<your-journey-id>", mode: "full-screen", scrollToTop: true, topBar: true, lang: "en", contextData: epilotData}])
__epilot.init([{contextData: epilotData, journeyId: "<your-journey-id>", mode: "full-screen", scrollToTop: true, topBar: true, lang: "en"}])
```

**Full example code:**
Expand All @@ -73,7 +73,7 @@ __epilot.init([{journeyId: "<your-journey-id>", mode: "full-screen", scrollToTop
const epilotQueryString = window.location.search
const epilotUrlSearchParams = new URLSearchParams(epilotQueryString)
const epilotData = Object.fromEntries(epilotUrlSearchParams.entries())
__epilot.init([{journeyId: "<your-journey-id>", mode: "full-screen", scrollToTop: true, topBar: true, lang: "en", contextData: epilotData}])
__epilot.init([{contextData: epilotData, journeyId: "<your-journey-id>", mode: "full-screen", scrollToTop: true, topBar: true, lang: "en"}])
</script>
```

Expand Down

0 comments on commit 1abf6e4

Please sign in to comment.