Journey JS

Journey JS is the javascript code that exists on your site, which allows Strala to capture the touchpoint interactions that happen as people interact with your ads, emails, high value experience pages, landing pages, and other Strala-tagged content.

The Journey JS is what ties Strala Touchpoints to the Strala JourneyStream. It is lightweight, asynchronous, and optimized to eliminate any interference with page load speed.

Typically through a tag management system, you will place the following code in the <head></head> of the pages on your site:

Note: You need to add your organization id in the place specified below. Also, you can copy the snippet with your org Id from the profile section of the app.
<script type="text/javascript">

"use strict";!function(){var e=window.journey=window.journey||{};if(e.config)return console.log("Journey loaded");e.initialize=function(e,n){if(!e.config&&!e.path&&!e.key)return console.error('[strala] "options" missing one of "config", "path", or "key"');if(e.config)return n(e.config);var t=e.path||""+e.key+".json",o=new XMLHttpRequest;o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE){if(!(o.status<300))return console.error(o.statusText);if(!o.responseText)return console.error("[strala] Request failed! No config available to parse.",o);if(n)return n(JSON.parse(o.responseText))}},"GET",t,!0),o.send()},e.load=function(n){e.config=n;var t=n.version||"current",o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=""+t+".js";var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(o,r)}}();

var options={key:"<ADD YOUR ORGANIZATION ID HERE>"};


Once the Journey JS is on your site, it will only fire when it detects an interaction with a Strala-tagged asset. Otherwise it will sit dormant, waiting for an interaction to appear.


To troubleshoot Journey JS and online events that should be firing, you can troubleshoot using the following steps.

1. Is Journey JS on your page and initializing?

To find out if journey JS is loaded on your page, open a browser (in this example, we're using Chrome) and open the debug console. In Chrome that is Ctrl+Shift+I on a PC or Command+Shift+I on a Mac.

Go to the Console tab. Clear the log and refresh the page. If journey.js is initializing correctly, you should see an entry that looks like: [journey.js] initializing

Additionally, if you type journey. in the console you should see a list of functions appear. If you see the list of functions, you know Journey JS is on the page. This will look like:

If you have plugins enabled and you are on a page that should have a Form tag, HVA tag, or Kiosk tag, but it does not, you will see a warning message that indicates the plugin can't be found. This will let you know if the plugin tag is missing.

If you have plugins enabled and you are on a page that shouldn't have any of these tags, the warning simply indicates the page correctly does not have those tags set.

2. Do you see any events coming through?

If Journey JS is on the page and initializing and the tags appear to be appropriately place on the page, you can check to see if events are firing.

To find any Touchpoint Interaction or Conversion events that are firing, go to the Network tab, select the Preserve log checkbox, clear the log, and refresh the page.

In the filter box, type events. You should see an entry that looks like events 201 xhr

When you click on the events Name, you will be able to see the details of the events. This is where you will see Touchpoint Interaction and Conversion event payload details.

For example, a pageload event will look like:

As another example, an HVA event would look like:

If you have Conversion events or other custom events, these will show up as separate events.

3. Does advanced debugging show any errors or warnings?

To turn on advanced debugging, within the console type journey.Debug.enable

When you refresh the page, you will get additional logging and warning information relating specifically to Journey JS. This can be helpful to troubleshoot why an event might not be firing.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us