This variable template retrieves contact information from the HubSpot CRM Contact API. It allows you to dynamically enrich your server-side event data with valuable customer properties directly from your HubSpot account.
Features
-
Direct CRM Integration: Queries the HubSpot CRM API to fetch up-to-date user data based on unique identifiers like Email or Contact ID.
-
Built-in Caching: Utilizes Server-Side GTM’s
templateDataStorageto cache responses, preventing redundant API calls for the same user and protecting your HubSpot API quota. -
Flexible Output: Extract the entire contact object or strictly filter for specific properties (e.g.,
firstname,phone).
Configuration
HubSpot Authentication
-
Access Token: Use your HubSpot
Private App Access TokenorService Key.Ensure it has the
crm.objects.contacts.readpermission.For more information on how to get your token, check the documentation: Private App Access Token or for Service Key.
Lookup Parameters
-
Identifier Choice: Choose the key used to look up the user in HubSpot. Options include:
- Contact ID
- Other unique identifier (Allows you to specify a custom key)
-
Identifier Value: The dynamic value (usually an Event Data variable) to search for.
-
Properties to Retrieve (Optional): A list of contact properties to return from HubSpot (e.g.,
email,firstname,lastname,phone).
Output Format
- Return entire object: The variable will return the complete response object provided by HubSpot.
- Return custom properties: Allows you to define a list of properties. The variable will return a clean object containing only those specific properties. If only one property is defined, it will return its string value directly.
Open Source
Hubspot Lookup Variable for Google Tag Manager Server Container is developed and maintained by Stape Team under the Apache 2.0 license.
GTM Gallery Status
Not listed