Learn how to add campaign names to contacts in HubSpot and Salesforce using GTM, Persist Campaign, and JS. 10 easy steps to implement this powerful integration.
To implement the campaign name tracking, we'll use Google Tag Manager (GTM). If you haven't already, install GTM on your website.
Before we can start tracking campaign names, we need to make sure your campaigns are properly tagged. Use UTM parameters to add campaign information to your URLs.
Next, create a custom HTML tag in GTM to capture the UTM parameters from the URL and store them as cookies.
Add the JavaScript code snippet provided in this blog post to your GTM custom HTML tag. This script will persist the campaign name as cookies.
In HubSpot, create a form field to capture the campaign name. This will allow you to associate the campaign name with each contact.
To ensure the campaign name is passed to Salesforce, map the UTM parameters to corresponding fields in Salesforce.
Using the GTM data layer, update the contact properties in HubSpot with the campaign name.
Similarly, use the GTM data layer to update the contact records in Salesforce with the campaign name.
If you have offline conversions that are linked to your Google Ads campaigns, you can also pass the campaign name back to Google Ads using offline conversion tracking.
Once everything is set up, thoroughly test the tracking and monitor the data in both HubSpot and Salesforce to ensure everything is working correctly.
By following these 10 easy steps, you can seamlessly add the campaign name to your contacts in HubSpot and Salesforce using GTM, Persist Campaign, and a bit of JS. This integration allows you to capture and track campaign data, sync it with your CRM, and even use it for offline conversions back to Google Ads.
If you need assistance with implementing this setup or have any questions, feel free to reach out to Full Stack Marketing. Start leveraging the power of campaign name tracking today!