Skip to main content

Install the SDK using the Google Tag Manager

This document describes how to install the Airbridge Web SDK using Google Tag Manager. For instructions on installing the Web SDK and sending events, refer to Install the Web SDK, Send Web Events.

Install the Web SDK

  1. In the container, click Workspace → Overview → Add a new tag, or Workspace → Tags → New.
Web SDK - GTM - Installation 2
  1. Click Tag Configuration → Choose tag type → Custom HTML.
Web SDK - GTM - Installation 2
  1. Write the Web SDK installation script in the HTML editor.
Web SDK - GTM - Installtion 3
  1. The Web SDK init function must run before any other functions. In Advanced Settings, enter a Tag firing priority greater than 0 (e.g., 9999).
  2. The Web SDK init function must run only once. In Advanced Settings, set Tag firing options to Once per page.
Web SDK - GTM - Installation 4
  1. Click Triggering and select a trigger whose Trigger Type is DOM Ready.
Web SDK - GTM - Installation 5
  1. If no trigger has been created yet, click the + button and select Page ViewDOM Ready to create a trigger.
Web SDK - GTM - Installation 6
Web SDK - GTM - Installation 7
Web SDK - GTM - Installation 8
  1. Click Save to create the tag.
Web SDK - GTM - Installation 9
  1. Click Submit to apply the changes.
Web SDK - GTM - Installation 10
  1. Check if events appear in Web Real-time Log in the Airbridge dashboard.

Track events

  1. In the container, click Workspace → Overview → Add a new tag, or Workspace → Tags → New.
Web SDK - GTM - Installation 2
  1. Click Tag Configuration → Choose tag type → Custom → Custom HTML.
Web SDK - GTM - Installation 2
  1. Write the Web SDK event tracking script in the HTML editor.
Web SDK - GTM - Track Events
  1. Depending on when the event occurs, in Advanced Settings, set Tag firing options to Unlimited, Once per event, or Once per page.
  2. Click Triggering and select a trigger that matches the situation in which the event occurs.
  3. Click Save to create the tag.
  4. Click Submit to apply the changes.
  5. Check if events appear in Web Real-time Log in the Airbridge dashboard.