Make sure you have an active Stape account with a server GTM container hosted on Stape.
If you don't have an account on Stape, please create one or log in if you already have. In the main menu click sGTM → Create container on the top right.
Add your container name, Container Configuration that you copied from your Google Tag Manager Server Container, and select server location. Click Create Container.
The setting process can be divided into two parts:
- Stape accounts data
- Salesforce CRM fields
You will need to fill in the following field:
- Container API Key - an alphanumeric string value that is needed for app identification. Find Container API Key in the Container settings section of your Stape account. See the detailed instructions on where to find Container API Key.
Next you need to map your CRM fields to conversion event parameters.
- (Optional) Pick a field where Meta Lead ID is stored. Note dropdown will only reflect custom fields.
- Configure additional User data you'd like to send to server GTM, by choosing a parameter in the left dropdown and selecting an appropriate field in the right-side one.
Application sends conversion Events based on stages of your Leads, whenever an opportunity reaches a stage you define, a corresponding event will be sent towards your Meta Dataset (Pixel).
In the left-side dropdown select a Lead stage to trigger an event, in a box to the right type the event name you’d like to send to Meta.
Select the Send all stages checkbox if you want to send all Contacts stages as events to server GTM. Events are then named automatically and consist of a Contact status name. You can also select stages to ignore in this case.
Once done, click Save and Connect. Once you see a success message your installation is complete and the application will send conversion events in the background based on your settings.
Configure sending data to the required platforms
With the current setup, the app will send events to your server GTM container, but to distribute them to platforms like Meta, TikTok, Google Ads, or any other, you need to configure the CAPI tags inside GTM to fire accordingly.
1. Configure the Data Client to claim the JSON requests sent from the CRM app. Go to the Templates → click “New” → upload the Data Client template you’ve previously downloaded from the Github.
2. Go to the Clients section of your sGTM container → click “New” → select Data Client. That’s basically it, your configuration will look like in the screenshot below. Click “Save”.
2. Select the platforms you need to send data to from sGTM. While setting up server-side tracking with sGTM, you might have already configured the CAPI tags for the required platforms, for example:
To give you an understanding of how to configure the tags this way, we will take the Facebook platform as an example. You should map the events according to the requirements of the platforms you use.
4. Create a new Facebook CAPI tag. Go to the Tags section in sGTM → add “Facebook Conversion API” as tag type.
Event Name Setup Method: Override
Event Type: Custom. Select a built-in variable “Event name”.
Action Source: System Generated.
Here is an example of how your configuration will look at this point:
User data section: select properties from the drop-down list - Lead ID, Browser ID, Click ID. These three are basic.
For each property, add a variable that will take the appropriate value from the request sent from the CRM app.
Create a following variable for Lead ID:
- Variable Type: Event Data
Create two different variables for Browser ID and Click ID:
- Variable Type: Event Data (for both), as the IDs will be retrieved from the event sent from CRM, not from the cookie.
- Cookie Name: fbp (for Browser ID variable) and fbc (for Click ID variable)
Here is an example of the user data section configuration:
Custom data section: add a few custom fields to identify the source of the event.
Event_source property name with crm value.
lead_event_source - as property value, add a variable with the following configurations:
- Variable Type: Event Data
- Key Path: lead_event_source
Here is how this configuration will look like in the tag:
6. Add a trigger for a tag.
Use the following configurations:
- This trigger fires on: Some events
Besides, add the following conditions for a tag to trigger:
- Client Name equals Data Client
- Action Source equals system_generated
The variable for action source must have configurations as on the screenshot below:
- Event Source equals crm
Configure the variable for the event source as shown in the screenshot:
As a result, your trigger will look similar to the example from the screenshot below:
Comments