JS tag
Concerned products
✅ Attract 🔳 Engage 🔳 Convert 🔳 Predict
Introduction
This document is written for the IT and marketing departments which are responsible for the corporation’s web and career pages. The document explains how the JS tag can be installed and triggered on a regular page based on HTML and JavaScript.
Adway's JS tag can be installed on your own career site and ATS to track the performance of your marketing efforts and build Social Talent Poolsâ„¢ that assert open jobs and employer value propositions are advertised to relevant audiences.
Adway's JS tag adds a Facebook Pixel as well as optionally Google Analytics (GA) tracking (configured on customer level and should be discussed during onboarding whether GA should be active or not).
During onboarding, you will be provided with a URL to a script that needs to be inserted into your job application and job ad pages. The URL points to a piece of JavaScript that will insert our tracking library into the global window
scope.
The goal of this document is to describe a simple case of how the tracking script can be installed on your websites. The installation process might need to be altered depending on the underlying technology being used by your company – e.g., if you are using Google Tag Manager, a CMS or installing it directly to an ATS, this will be part of the onboarding process.
Installing the tag
Adway will provide you with a unique tag that you need to insert at the end of either the <head>
or <body>
element on your career site.
The unique tag will look similar to this:
You can also install the script using Google Tag Manager (GTM), instructions can be found here:
Verifying the tag
You can verify that the tag is installed properly by asserting that window.adway
is loaded and available through-out your career site.
This can easily be done using any modern browser:
Navigate to a site the site you want to verify
Chrome or Edge -> Right click anywhere on the page -> Click "Inspect"
Safari -> Right click anywhere on the page -> Click "Inspect Element". If this option does not appear you need to enable "Develop menu". Click "Safari" in top left corner -> "Settings" -> "Advanced" -> Make sure that the option "Show Develop menu in menu bar" is enabled
In the new tab that opened navigate to "Console"
Type
window.adway
and hit enterIf the script tag has been installed correctly you should see the following when expanding the object found:
If the event object does not appear make sure that you have accepted cookies and do not have any tools in your browser that disable javascript. If it still does not appear, the script tag has not been installed correctly.
The most important part is that the Adway pixel is loaded (Pixel ID 774783043158501) and that the "CUSTOM PARAMETERS SENT" block under "ViewContent" is not empty. If it is not showing up, make sure that you accept cookies and do not have any cookie or javascript blockers active in your browser. If the Pixel is there, but "ViewContent" does not contain any "CUSTOM PARAMETERS SENT" the script has been successfully installed, but the event for the view has not been triggered correctly.
Triggering the events
With the tag properly installed and loaded on your career site you can proceed with calling three different functions at certain events:
1. When a visitor browses an open job
atsJobId
represents your ATS id of the open job.
2. When a visitor begins their application
atsJobId
represents your ATS id of the open job.
3. When a visitor submits their application
atsJobId
represents your ATS id of the open job.
Installing with Google Tag Manager (GTM)
Create a variable
To start off you will need to setup a variable to capture the atsJobId
which will be used in a later step in order to properly invoke the events.
Login to GTM, select your workspace and navigate to "Variables" in the left side menu. In the "User-Defined Variables" field click "New". This will bring up a side menu where you get to define your variable.
Provide a descriptive name and click the edit button.
In the "Component Type" field select "Query" from the dropdown list, and in the "Query Key" field enter the name of your query parameter. The query parameter is the name right infront of the
atsJobId
in your url, so if you have this url:www.yourcareerpage.com/jobs&jobId=1234
the query key should be entered as "jobId"Click "Save". You should now see the newly created variable under "User-Defined Variables". This variable will now be available to you within the workspace chosen in Step 1.
Create a trigger
Now we need to setup a "Trigger". Triggers are responsible for initiating "Tags", and we want to ensure that we initiate the Tags at the right moment.
Navigate to "Triggers" in the left side menu. In the "Triggers" field click "New". This will bring up a side menu where you get to define your trigger.
Provide a descriptive name and click the edit button.
In the menu that opened, select "Page view" as "Trigger type"
In the "This trigger fires on" field, select "Some Page Views" Add two trigger conditionals. The first one should be Page URL -> contains ->
www.yourcareerpage.com/jobs
, click the plus and add a second one where you select your User-Defined Variable created earlier, then "matches RegEx" and in the last field write^(?!\s*$).+
. The regular expression (or RegEx) will match any value which contains at least one non-space character, this is added to avoid triggering the Tag in the case where theatsJobId
is missing.
Create a Tag
This is the final step. Using the Variable and Trigger previously created we will now add the Adway JS tag to your site.
Navigate to "Tags" in the left side menu. In the "Tags" field click "New". This will bring up a side menu where you get to define your tag.
Provide a descriptive name, under "Triggering" add the trigger created previously and then in the "Tag Configuration" field click the edit button.
In the menu that opened, select "Custom HTML" as "Tag type"
Fill in the "HTML" section with a script tag which will fire the jobViewed event using the variable setup previously.
<script>window.adway.event.jobViewed({{adway-atsJobId}})</script>
Leave Triggering empty and click "Save", when asked if you want to create without any triggers click "Save Tag".Repeat steps 2 and 3 to create a new Tag with the Custom HTML type. Example name could be "Adway - JS Tag Installation"
In the new Tag, fill in the "HTML" section with the script tag given to you during onboarding. It will look something like this:
<script src="your.url.here">
Under "Advanced Settings" expand "Tag Sequencing", check the box "Fire a tag after ...." and select the tag create previously, lastly check the box for "Don't fire if it fails or is paused".
Last updated