Stape
Search
Try for free

How to set up Salesforce tag using server GTM

Published
Feb 24, 2025

In this article we will show you how to set up Salesforce tracking using server GTM. To set up the Salesforce tag, you will need to:

  1. Configure a server GTM container.
  2. Set up sending data from the web to the server GTM container.
  3. Add the Salesforce tag from the GTM template gallery.
  4. Configure the tag. With it you can track lead events, but a feature that allows creating new contacts is coming soon.
  5. Add the trigger to a tag.
  6. Test the setup.

Below, we’ll describe the configuration process in more detail.

What is a Salesforce tag for Google Tag Manager?

The Salesforce tag developed by Stape works for server GTM; it enables server GTM to communicate with the Salesforce API. Now, with its help, you can track lead events; in the future, a new feature will allow you to create new contacts.

So, what are the benefits of implementing a Salesforce tag on the server GTM container? 

  • More accurate data recorded. 
  • Data is less impacted by ad blockers and browser restrictions, such as ITP.
  • Quicker website load as all the tags are loaded on the server instead of the user’s browser.
Discover more advantages of server-side tracking in our other blog post.

Before starting

Before configuring Salesforce tag, make sure you:

How to set up Salesforce tag

1. To add the Salesforce tag, go to “Templates” section of server GTM → next to “Tag Templates” click on “Search Gallery” → find the “Salesforce Stape” tag → click “Add to workspace”.

Add Salesforce tag template

2. Go to the “Tags” section → click “New” → add “Salesforce by Stape” as tag configuration.

Add Salesforce as tag configuration

3. Configure the tag.

3.1 Salesforce instance domain - is the specific server cluster where your Salesforce version is hosted. It can be found in Company Information (from Setup, in the Quick Find box, enter “Company Information” and select it → navigate to “Instance field”). The instance domain should be in the format “my-instance.salesforce.com”.

For detailed instructions on how to find instance information, check the Salesforce guide.

3.2 Access Token - is the key to Salesforce API. The client should pass the authorization flow, and then Salesforce can issue a token to access protected Salesforce data. You can learn more about getting the token in Salesforce documentation.

3.3 Lead data - list lead events that you want to track. See the list of events that you can track in Salesforce documentation.

Below is an example of Salesforce tag configuration:

Example of Salesforce tag configuration

4. Add a trigger for a tag.

5. Test whether the tag fires. Trigger a tag and check in both server and web GTM containers. In case of any difficulties, see the detailed guide on debugging and monitoring.

Conclusion

Configuring the Salesforce tag for the server GTM offers a lot of advantages, such as accurate data tracking and higher data control. The tag allows you to monitor lead events and, in the future, create new contacts. The setup process is straightforward and quick, letting you benefit from server-side tracking in no time!

Comments

Try Stape for all things server-sideright now!