Setting up clearbit.js with Google Tag Manager
Create a custom Clearbit HTML Tag
Open Tag Manager and navigate to the Container that has your Google Analytics tag (if you're using GA). Create a New Tag and name it. Select the Custom HTML Tag option.
Next, head to the clearbit.js configuration page to copy and paste the snippet into the textarea.
Next make sure to add any domains that you'll be loading Clearbit tags on to the Allowed Referrers list. This will make sure that your public api key won't be used on any other sites.
Finally, you'll configure Tag sequencing in Advanced Settings. Specifically, if you are also loading Google Analytics, you will want to make sure the primary GA tag is firing before clearbit.js. From there, set the Firing Triggers to Page views upon All Pages.
An example screenshot is below:
If you just want to send your web traffic to Clearbit X, you're all done! Visit your Clearbit Companies Dashboard to see your live web traffic.
- Connect Clearbit X with Segment webhooks and send Segment events
- Send identify calls with clearbit.js
Once you have done those steps, then you can move onto building your Clearbit X segment.
If you are not sure if clearbit.js is properly sending data through Google Tag Manager, please refer to these development resources.