Assistance Needed - Issue with Google & Facebook Leads Tracking After API Shift
resolver
Hi everyone,
I hope you are doing well. We need assistance with an issue that has come up after we transitioned from using Hapikey (v2 version) to a Private App (v3 version) for our API calls. Since this change, we've had trouble tracking Google and Facebook leads in our HubSpot contacts list.
Previously, using [specific code], tracking for Google contacts worked correctly with the v2 version. However, after switching to the v3 version, the tracking no longer differentiates properly between Google and Facebook leads. Instead, [specific code] seems to aggregate contacts from both sources under a single filter in the HubSpot contacts list, specifically under the "Original source drill-down 2" filter option.
Could you help us resolve this issue so that we can correctly track and differentiate leads coming from Google and Facebook separately, as we did before?
Your prompt attention to this matter would be greatly appreciated.
Could you please share the code and screenshot of the issue you're experiencing? This will help me better understand the problem and assist you more effectively.
"I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member. Thanks!"
What I understand from your code is that you are storing the contact source in the contact property, and while creating the deal, you are sending that source contact property to the deal property "contact_source". Could you please verify at which point you are facing the problem? Is it in getting the source value in the contact property, or in creating the deal with that property as one of the options? If there is another approach, please explain it so that we can provide a prompt solution.
I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member. Thanks!
Could you please share the code and screenshot of the issue you're experiencing? This will help me better understand the problem and assist you more effectively.
"I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member. Thanks!"
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:
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.
What I understand from your code is that you are storing the contact source in the contact property, and while creating the deal, you are sending that source contact property to the deal property "contact_source". Could you please verify at which point you are facing the problem? Is it in getting the source value in the contact property, or in creating the deal with that property as one of the options? If there is another approach, please explain it so that we can provide a prompt solution.
I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member. Thanks!
The problem we are facing is that deals are being created for each purchase, but not every time the contact source [whether from facebook or google purchase] is correctly reflected in the deals. This issue persists despite the cookie expiration being set to 90 days.
Should you require further details, please don't hesitate to ask, and we'll gladly provide additional information.