- 07 Oct 2024
- 3 Minutes to read
- Print
- DarkLight
Google Tag Manager
- Updated on 07 Oct 2024
- 3 Minutes to read
- Print
- DarkLight
By default, Google Analytics cookies will only be collected when the Cookies Consent Banner is enabled. Previously, analytics were collected when the banner was disabled.
For customers who have not enabled the cookie consent banner, tracking was mistakenly disabled as of August 27, 2024.
If you wish to re-enable tracking, please contact Blackthorn Support, and we will apply the necessary flag to your account. Please include your org ID and desired configuration.
Configuration options:
- Enable tracking analytics with a cookie consent banner in place (recommended)
- Enable tracking analytics without a cookie consent banner in place (pre-August 27th default behavior; not recommended)
Blackthorn Events supports Google Analytics and Google Tag Manager.
Google Analytics can provide important insights you’re looking for. However, when used alone, Google Analytics has limitations. By using Google Tag Manager in conjunction with Google Analytics, you can collect more data on Attendees.
Click here to see the full list of supported tags. Blackthorn supports everything in the Web column.
Please reach out to Blackthorn Support to enable cookies for your Attendees and to ensure data laws have been considered.
Create a (GA4) Google Analytics Account
If you already have a (GA4) Google Analytics account, please go to the next section.
- Go to https://analytics.google.com.
- Click Start measuring.
- Select all options for account data sharing.
- Click Next.
- Enter a name for the property and select a time zone and currency.
- Click Next.
- Select an industry category and business size.
- Click Next.
- Select how you will use Google Analytics.
- Click Create.
- Select “WEB” for the data stream. (For the website URL, use events.blackthorn.io (https://events.blackthorn.io/).)
- Enter a Stream name.
- Click Create stream.
- Save the measurement id (or Google Analytics Id) from the newly created data stream. It will start with 'G-'.
Set up Google Tag Manager
- Go to the Tag Manager.
- Sign into your Google account.
- Click the Accounts tab.
- Click Create Account.
- Enter an Account Name.
- Select a Country.
- Enter “events.blackthorn.io” (http://events.blackthorn.io/) in the Container name field.
- Select “Web” for the Target platform.
- Click Create.
You will receive the installation code snippet for your website.
Set Up Variables
- Go to the Variables section.
- Click Configure.
- Select all checkboxes under the "Clicks", "Forms" and "History" sections.
Set Up Triggers
- Go to the Triggers section.
- Click New.
- Set Trigger Type to “History Change.”
- Select "All History Changes" in the "This trigger fires on" section.
- Click Save.
- Enter a name for the trigger.
Set Up Tags
- Go to Tags section.
- Click New.
- Enter a Tag name.
- Set the Tag type to “Google Tag."
- Enter the measurement id (or Google Analytics Id) in the Measurement Id field. (See the last step in Create a (GA4) Google Analytics Account.)
- Click Trigger Configuration.
- Select the “History Change” trigger type. (unless you changed the name)
- Click Save.
- Go to the Overview section.
- Copy/save the “GTM-“ code/id.
Update Your Salesforce Org
- Go to your Salesforce org.
- In the App Launcher, enter “Company Info” and click the link.
- Open an existing Company Info record or create a new one.
- Confirm that the Google Tag Manager ID and Use for All Events fields are displayed on the page layout. If they aren’t, add them.
- On the Company Info record, enter the Google Tag Manager ID in the Google Tag Manager ID field.
- Set Use for All Events = "True" (checked).
- Click Save.
You should now see traffic reports on your Google Analytics account.
It may take up to 48 hours for the first traffic events to appear in Google Analytics if the account is new.
Iframes
If you are using Google Tag Manager with iframes, please ensure your CSP restrictions allow adding iframes from other domains. If allowed, the Google Tag Manager will generate an iframe to perform the tracking on your site.
If you don't want to relax CSP rules, please add the following cross domain frames:
- https://*.google.com
- https://*.gstatic.com
- https://*.google-analytics.com
- https://*.googletagmanager.com
Test Your Setup
To confirm that everything was configured correctly, complete the following steps.
- Create and publish a new Event record in your Salesforce org.
- Copy the Event’s Event Page URL.
- Go to your Google Tag Manager account.
- Click the Preview button.
- Enter the copied Event Page URL in the “Your Website URL” field.
- Click Connect.
Two new tabs will appear. One will show the Event’s web page. The other will be a debug page with the tags that were identified on the Event web page.
If you see your tag in the Summary’s “Tags not fired” section, then everything was configured correctly.