← Back to Blog

How to Add Campaign Name to Contact in HubSpot and Salesforce

Topic: Campaign Tracking
How to Add Campaign Name to Contact in HubSpot and Salesforce

Table of Contents:

  1. Introduction
  2. Step 1: Implementing GTM
  3. Step 2: Persisting Campaign Data
  4. Step 3: Saving UTM Parameters as Cookies
  5. Step 4: Sending Data to CRM
  6. Step 5: Using Campaign Name for Offline Conversions
  7. Conclusion
  8. CTA

Are you looking to add campaign name data to your contacts in HubSpot and Salesforce? This blog post will guide you through 10 easy steps to achieve this using GTM, Persist Campaign, and a bit of JavaScript. By saving UTM parameters as cookies and then sending them to your CRM, you can track the effectiveness of your campaigns and improve your offline conversions. Let's dive in!

Step 1: Implementing GTM

To get started, you'll need to implement Google Tag Manager (GTM) on your website. GTM allows you to easily manage and deploy various tags, including tracking pixels for tracking campaigns. You can find detailed instructions on how to set up GTM in the official GTM documentation.

Step 2: Persisting Campaign Data

Next, you'll need to set up the Persist Campaign plugin in GTM. This plugin allows you to persist the campaign data, such as UTM parameters, across multiple page views. This ensures that the campaign data remains intact even when the user navigates through different pages on your website.

Step 3: Saving UTM Parameters as Cookies

Using JavaScript, you can extract the UTM parameters from the URL and save them as cookies. This way, the UTM parameters will be stored locally on the user's device, allowing you to access them whenever needed.

Step 4: Sending Data to CRM

Once the UTM parameters are saved as cookies, you can use JavaScript to send this data to your CRM, such as HubSpot or Salesforce. This ensures that the campaign data is associated with the respective contact in your CRM, enabling you to track the source and effectiveness of your campaigns.

Step 5: Using Campaign Name for Offline Conversions

In addition to online conversions, you can also use the campaign name for tracking offline conversions. By including the campaign name in your offline conversion tracking system, you can attribute offline conversions back to your Google Ads campaigns, giving you a comprehensive view of your campaign performance.

Conclusion

Adding the campaign name to contacts in HubSpot and Salesforce is a powerful way to track the effectiveness of your marketing campaigns and improve your offline conversions. By implementing GTM, persisting campaign data, saving UTM parameters as cookies, and sending the data to your CRM, you can ensure that the campaign data is seamlessly integrated into your marketing and sales processes.