Assistance Needed - Issue with Google & Facebook Leads Tracking After API Shift

Hi @GRajput,

Thank you for your response.

We have implemented a “Javascript Cookie” concept on our website pages to track the “utm_source” of visitors coming from Facebook or Google ads. This “utm_source” is then sent to the Deal creation API call and stored in a custom property called “contact_source.” While this logic works for some contacts, it does not consistently capture the source for all contacts coming from Facebook or Google ads.

We are using Private App concept in version 3, we are using PHP CURL call concept. Following are the sample:

API endpoint link: https://api.hubapi.com/crm/v3/objects/deals
Request parameters:
$properties = array(
//Other request parameters
‘contact_source’ => $_COOKIE[‘sf_source’]
);
$hubspot_fields = array(
‘properties’ => $properties
);

Apart from above logic, we have used the JavaScript tracking script throughout the pages of the website:

<!-- Start of HubSpot Embed Code -->
<!-- <script type=“text/javascript” id=“hs-script-loader” async defer src=“//js.hs-scripts.com/HUBID.js”></script> -->
<!-- End of HubSpot Embed Code -->

This script serves to display the HubSpot chat option on the website and also facilitates the storage of contact source indicators (e.g., Paid social, Paid search) in the ‘Original source drill-down 2’ filter option in V2.

Should you require further details, please don’t hesitate to ask, and we’ll gladly provide additional information.

Thank you again.