Integration docs
  • Integrating
    • Getting started
    • JSON feed
    • JS tag
    • CSV import
    • REST API
    • Webhooks
  • Security
    • SSO authentication
  • Onboarding
    • Getting started
    • ATS Sync
      • ICIMS
      • Teamtailor
      • Recruiterflow
      • SAP SuccessFactors
      • Ashby
      • Pinpoint
      • Lever
      • Salesforce
      • Jobylon
      • Workday
      • Greenhouse
      • SmartRecruiters
      • Bullhorn
      • Bullhorn Recruitment Cloud (Bullhorn for Salesforce, BH4SF)
      • ReachMee (TalenTech)
      • Recman
    • Social ads
    • Social pages
      • Facebook & Instagram
      • LinkedIn
      • Snapchat
    • Social talent pools
      • Setup process
  • Templates & Content - Creative Assets
    • Getting Started
      • Image Templates
        • Aspect ratios & sizes
      • Text Templates
      • Exporting assets to Adway
      • Forbidden Content
    • Advanced
      • Dynamic text replacements
      • Variations
Powered by GitBook
On this page
  • Introduction
  • Installing the tag
  • Verifying the tag
  • Triggering the events
  • Installing with Google Tag Manager (GTM)
  1. Integrating

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:

<script src="your.url.here">

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:

  1. 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

  2. In the new tab that opened navigate to "Console"

  3. Type window.adway and hit enter

  4. If the script tag has been installed correctly you should see the following when expanding the object found:

  5. 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.

  6. 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

window.adway.event.jobViewed(atsJobId)

atsJobId represents your ATS id of the open job.

2. When a visitor begins their application

window.adway.event.applyStarted(atsJobId); 

atsJobId represents your ATS id of the open job.

3. When a visitor submits their application

window.adway.event.applyCompleted(atsJobId); 

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.

  1. 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.

  2. Provide a descriptive name and click the edit button.

  3. 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"

  4. 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.

  1. 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.

  2. Provide a descriptive name and click the edit button.

  3. In the menu that opened, select "Page view" as "Trigger type"

  4. 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 the atsJobId 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.

  1. 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.

  2. Provide a descriptive name, under "Triggering" add the trigger created previously and then in the "Tag Configuration" field click the edit button.

  3. In the menu that opened, select "Custom HTML" as "Tag type"

  4. 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".

  5. Repeat steps 2 and 3 to create a new Tag with the Custom HTML type. Example name could be "Adway - JS Tag Installation"

  6. 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">

  7. 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".

PreviousJSON feedNextCSV import

Last updated 1 year ago

To verify that events are properly being triggered you will need to install . It should look something like this:

This section will describe how to install and trigger events for the Adway script tag using GTM. Full documentation for how to setup GTM can be found here . Bear in mind that your system might not be directly compatible with the exact way that the description below suggests. Some of the steps might need to be altered to fit your situation, if you run into issues please consult Googles own documentation, and if that is not clear you can reach out to your assigned Onboarding Manager at Adway.

This step will differ depending on how the atsJobId is accessible in your specific system. The example provided here assumes that the atsJobId appears as a query parameter in the URL. If this is not the case, consult the for how you could set this up for your specific situation. In the menu that opened, select "URL".

Click "Save". You should now see the newly created trigger under "Triggers". This trigger will now be available to you within the workspace chosen in Step 1 of

Under the "Triggering" section, select the trigger created during the section and click "Save". This will create the tag that loads the Adway JS tag so the tracking library is available on the page, and then trigger the event using the first tag we created.

Finally, click "Submit" to roll out the changes on your page, and you are done! You can verify that everything is working by following the steps in .

Meta Pixel Helper browser plugin
https://support.google.com/tagmanager
GTM User-Defined Variables documentation
Create a Variable
Create a trigger
Verifying the tag section
Example of Adway script tag event structure shown in Chrome browser Console