How To Set Up Salesforce Tracking With Google Tag Manager

How To Set Up Salesforce Tracking With Google Tag Manager

Salesforce’s suite of products offers robust functionalities, but their approaches to tracking and analytics vary across different platforms. Each Salesforce product category—ranging from Commerce Cloud to Marketing Cloud—possesses distinct features and tracking capabilities. While some products have well-defined methods for tracking, others rely on proprietary analytics tools integrated into the platform. This article delves into tailored examples for various Salesforce products, shedding light on the diverse tracking approaches, methods prevalent within each category and opportunities to use Google Tag Manager and GA4 to provide additional tracking of user interactions where available. Let’s dive in!

Commerce Cloud Tracking

Commerce Cloud may use its own methods for tracking events. Unfortunately, Salesforce Commerce Cloud doesn’t have an official JavaScript API for tracking interactions like Google Analytics does. Typically, tracking and reporting are managed within the Commerce Cloud’s built-in analytics and reporting features.

Community Cloud Tracking

For Community Cloud, while Salesforce provides APIs for interaction tracking, the method names and tracking specifics might vary based on custom implementations or the version of the Community Cloud being used.

Actions Trackable with GTM

Using GTM, you can capture specific interactions within Community Cloud by deploying GA4 event tags and triggers based on user actions.

  1. User Registrations:
    • Implementation: Utilize GTM’s GA4 Event Tag to capture form submissions for user registrations within Community Cloud.
    • Setup: Use Form Submission triggers to track user registration forms.
    • Example:
      • Configure a GA4 Event Tag within GTM to capture form submission events for user registrations:
        • Tag Configuration in GTM:
          • Tag Type: Google Analytics 4 Event
          • Event Name: user_registration
          • Event Parameters:
            • form_id: {{FormID}}
            • Other relevant parameters
  2. Post Submissions & Forum Interactions:
    • Implementation: Use GTM’s GA4 Event Tag to track interactions like post clicks, comment submissions within Community Cloud.
    • Setup: Set up Click triggers for forum elements or buttons.
    • Example:
      • Configure a GA4 Event Tag within GTM to capture interactions within the forum:
        • Tag Configuration in GTM:
          • Tag Type: Google Analytics 4 Event
          • Event Name: forum_interaction
          • Event Parameters:
            • interaction_type: {{button_click}}
            • Other relevant parameters

These examples illustrate how to set up GA4 Event Tags within GTM for tracking specific events within Community Cloud. Adjust the event names and parameters according to your tracking requirements and GTM variable setup. For a detailed walkthrough, see the following developer article on Salesforce:

https://developer.salesforce.com/blogs/2019/04/google-tag-manager-for-community-cloud

Marketing Cloud (including Pardot) Tracking

Marketing Cloud, including Pardot, offers tracking capabilities through specific APIs or tracking pixels for emails, forms, and landing pages. The methods can vary based on the specific tracking requirements and the version of Marketing Cloud or Pardot being used.

Actions Trackable via GTM

  1. Form Submissions on Landing Pages:
    • GTM Implementation: Use GTM’s GA4 Event Tag to track form submissions on Marketing Cloud or Pardot landing pages.
    • Setup in GTM: Create triggers for successful form submissions or specific events triggered upon form completion.
    • Example:
      • Configure a GA4 Event Tag within GTM to capture form submission events on landing pages:
        • Tag Configuration in GTM:
          • Tag Type: Google Analytics 4 Event
          • Event Name: form_submission
          • Event Parameters:
            • form_id: {{FormID}}
            • Other relevant parameters
  2. Engagement Metrics on Web Content:
    • GTM Implementation: Utilize GTM’s GA4 Event Tag to capture interactions with web content linked from Marketing Cloud or Pardot emails.
    • Setup in GTM: Set triggers to monitor visits to specific URLs or pages associated with the email campaigns.
    • Example:
      • Configure a GA4 Event Tag within GTM to capture pageview events on linked web content:
        • Tag Configuration in GTM:
          • Tag Type: Google Analytics 4 Event
          • Event Name: button_click
          • Event Parameters:
            • link_text: {{click_text}}
            • Other relevant parameters

These examples illustrate how to set up GA4 Event Tags within GTM for tracking specific events within Marketing Cloud, or Pardot. Adjust the event names and parameters according to your tracking requirements and GTM variable setup.

Salesforce Mobile App Tracking

The Salesforce Mobile App typically doesn’t expose direct tracking methods via JavaScript APIs for user interactions. Tracking within the mobile app is often managed and analyzed within the Salesforce platform itself, leveraging the Salesforce mobile SDK for app analytics.

Sales Cloud Tracking

Sales Cloud may not provide direct JavaScript tracking methods like those in a web environment. Instead, tracking within Sales Cloud often involves capturing and analyzing data through the platform’s native functionalities, like lead conversion, opportunity creation, or using connected analytics tools.

Conclusion

In the realm of Salesforce products, tracking and analytics strategies are as diverse as the platforms themselves. Whether it’s Commerce Cloud leveraging internal reporting features or Community Cloud utilizing its APIs for interaction tracking, each product presents unique tracking methodologies. Marketing Cloud and Pardot stand out with their tracking capabilities via APIs and tracking pixels, empowering marketers with detailed insights. However, Salesforce Mobile App and Sales Cloud often lean on native functionalities for analytics. Overall, while tracking across Salesforce products may vary in terms of methods and intricacies, understanding these nuances is crucial for effective utilization and informed decision-making within each platform.