This article will guide you on how platforms like Facebook Ads, Google Ads, Google Analytics 4, and TikTok collect data and how you can use it to improve your marketing strategies.
Businesses increasingly use third-party platforms like Facebook Ads, Google Ads, Google Analytics 4, and TikTok to reach potential customers and gather valuable data. These tools collect user data, which can be sent along with leads to create more targeted marketing campaigns.
There are two possible ways to collect data from third-party services:
JS Form
To enable the third-party services data collection via the form, go to the Publisher Management > Promo Materials > JS Form section. Click the “Settings” button next to the corresponding JS Form, and switch the toggle “Enable Third-Party Services Data Collection.”
Now, go to Advanced Options under the JS form code, copy the Params tracking code, and place it on every page of your website which will accept traffic from these traffic sources. This is necessary to collect data from third-party services like Facebook Ads (_fbp and _fbc parameters), Google Ads (GCLID parameter), Google Analytics 4 (_ga parameter), and TikTok (ttclid parameter), along with lead information when a form is submitted.
Note: Without this code, data collection won’t work.
Read more about JS Form setup in the Knowledge Base article.
Your Custom Form
If you’re using your custom form to collect data, you should collect the following values and send them along with the lead:
- Facebook Ads
- Facebook Pixel ID: Extract the “_fbp” parameter from the user’s cookie and send it with lead in the “fbp” variable.
Note: Facebook Pixel ID is used for analytics and retargeting campaigns. Read more about the fbc and fbp parameters in Meta API Documentation. - Facebook Click ID: Extracts the “fbclid” URL parameter or “_fbc” parameter from the user’s cookie. Send it with lead in the “fbc” variable.
Note: Facebook Click ID is used for campaign attribution, allowing the tracking of ad effectiveness. Read more about the fbc and fbp parameters in Meta API Documentation.
- Facebook Pixel ID: Extract the “_fbp” parameter from the user’s cookie and send it with lead in the “fbp” variable.
- Google Ads: Collect the Google Click Identifier (GCLID), automatically added to the URL as a parameter when using auto-tagging in Google Ads. Send it with the lead in the “gclid” variable.
Note: GCLID is a parameter that is passed to the URL when an advertisement is clicked. With it, you can get information about the click, including which advertising campaign it is associated with. Read more about the GCLID definition in the Google Ads Help Center. - Google Analytics 4: Collect the Client ID or “_ga” parameter, extracted from cookies or can be assigned programmatically, and send it with the lead in the “GA4ClientId” variable.
Note: This Client ID identifier is used for tracking users and sessions in Google Analytics 4. Read more about Google Analytics 4 in the Google Analytics Help Center. - TikTok: Collect the “ttclid” parameter, passed through the URL when navigating via TikTok ad links. Send it with the lead in the “ttclid” variable.
Note: The “ttclid” parameter is used for tracking the effectiveness of ad campaigns on TikTok. Read more about the TicTok Click ID in the TikTok API Documentation. - UTM: Collect UTM tags in the URL, including “utm_source”, “utm_medium”, “utm_campaign”, “utm_term”, and “utm_content”:
- utm_source: Traffic sources, such as Google, newsletter, or another specific source.
- utm_medium: Type of marketing channel, such as email, CPC, or others.
- utm_campaign: The name of the ad campaign, allowing you to identify a specific ad promotion.
- utm_term: Used for search ad campaigns to identify keywords for ads.
- utm_content: Used for A/B testing and content-oriented ads to differentiate between ads or links directing to the URL.
Once you set up the server-to-server integration, the corresponding info will show up in the “Get Log” tab of the “Lead Info” report.
Read more about the “Lead Info” report in the Knowledge Base article.
To display this data in the Lead Body, you should set up the “Extra Fields” on the Product level.
To add these special service fields as extra fields for the Product, click the “Add Preset Field” button. Make a selection in the “Preset Field” pop-up window and click the “Add” button.
Note: Preset fields are extra fields for service fields like jornayaLeadId and trustedFormURL that are automatically created for Products that do not have these fields in the product configuration.
Once the preset fields are added, they can not be edited or deleted. In case all available preset fields are added, the "No more preset fields available" pop-up window will be displayed.
Read more about the Extra Fields tab in the Product Settings in the Knowledge Base article.
Tracking
Once you set up the third-party service data collection from the JS Form or your own form, you can set up the corresponding tracking rule on the Product level.
Go to the System Management > Products section, click the “Configure” button next to the corresponding Product, and click the “Tracking” tab. To add a new Tracking Rule, click the “Add Rule” button, select the action you want to perform, the trigger for this action, and click the “Next” button.
In the “Add Rule” pop-up window fill in the required fields. In the Client ID field, click the “Show available placeholders” button and use the corresponding placeholders from the “Publisher data” block to set up the tracking of the third-party service data collection from the form:
- Google Analytics 4: { %leadGet_GA4ClientId% }
- Facebook Click ID: { %leadGet_fbc% }
- Facebook Pixel ID: { %leadGet_fbp% }
- Google Ads: { %leadGet_gclid% }
- TikTok: { %leadGet_ttclid% }
- UTM: { %leadGet_utm_campaign% }, { %leadGet_utm_medium% }, { %leadGet_utm_source% }, { %leadGet_utm_term% }
Click the “Save Rule” button to finish.
Read more about the Tracking tab in the Product Settings in the Knowledge Base article.