Load WordLift Cloud with Google Tag Manager
Set up a Custom HTML tag in Google Tag Manager to load bootstrap.js on every page view.
Prerequisites
- You have a Google Tag Manager account.
- A container is created for the website where you will load WordLift Cloud.
- You can log in to tagmanager.google.com with permission to edit tags.
1) Open the correct container
- Go to https://tagmanager.google.com/.
- If you have more than one account, choose the correct Account.
- Select the Container for the target website.
You should now be on the Workspace for that container.
2) Create a new tag
- In the left sidebar, click Tags.
- In the upper right, click New.
- In the tag card, click Tag Configuration.
3) Choose the tag type (Custom HTML)
- In the Choose tag type panel, scroll to Custom.
- Click Custom HTML.
You should see Tag Type: Custom HTML with an HTML code box.
4) Add the HTML code
-
In the HTML field, paste:
<!-- WL Cloud -->
<script type="text/javascript" src="https://cloud.wordlift.io/app/bootstrap.js"></script>
<!-- End WL Cloud --> -
Leave other settings at their defaults unless instructed otherwise.
5) Add a Page View trigger for all pages
- Under Triggering, click Add Trigger.
- Select Page View (or All Pages if you already have one).
- If you need a new trigger:
- Click the plus icon.
- Click Trigger Configuration.
- Select Page View.
- Under This trigger fires on, choose All Page Views.
- Name it (for example
Page View - All Pages) and save.
- Confirm the Page View trigger is listed under Triggering for the Custom HTML tag.
6) Name and save the tag
- Replace Untitled Tag with a clear name (for example
WL Cloud bootstrap). - Click Save.
7) Preview and publish
- In the top right of the workspace, click Preview.
- Enter your site URL and start the preview session.
- In Tag Assistant, navigate a few pages and confirm the Custom HTML tag fires on Page View events.
- If everything looks correct, return to Google Tag Manager and click Submit.
- Add a version name/description if desired, then click Publish.
The bootstrap.js script now loads on all page views for this container.