Most of the created contacts are determined to be from offline sources. Want to change this.
Most of the created contacts are determined to be from offline sources.
Is there a way to overwrite this?
We want to analyze impact of
Reports > analytics tool > Contact analytics
We want to analyze the impact of our advertising effectiveness using Contact dashboard which is located at Reports > analytics tool > Contact analytics
my code will
⬇︎here is my application action.
Frontend is React SPA. Backend API Service is Ruby on Rails.
1. Users come my LP by some method. (Advertise, Organic search, direct link, ...)
2. Move from LP to React SPA.
3. Users fill a signup form and submit form. handleSubmit method is called. this method send params to backend API.
4. In backend, create Hubspot::Contact and Hubspot::Company
Don't: Use the Contacts API, as it cannot pass hutk cookie values. Use the Events HTTP API, as it also won't pass cookies.
Do: Use either the trackPageView or trackEvent JavaScript functions after the identify function. These will pass a hutk cookie to the new contact record. Alternatively, use this Forms API endpoint and pass a hutk value directly in the context object.
Most of the created contacts are determined to be from offline sources. Want to change this.
Thanks for reply.
You said
Don't:
Use the Contacts API, as it cannot pass hutk cookie values.
and
Do:
Use either the trackPageView or trackEvent JavaScript functions after the identify function. These will pass a hutk cookie to the new contact record.
As you can see from my code, I use both Contacts API in ruby and trackPageView function in react.
When using both the Identify a visitor and Track page view, this would pass a hutk cookie and this would also create a new contact if there is no existing contact with that email. It would also update contact if there's existing contact tie to that email.
Hence, you do not need to call the Contacts API in ruby again to create the contact.
If you'd like to pass custom properties, you can do so by sending the custom properties via the Identify a visitor function.
/*
This example sets the email,
as well as a custom property favorite_color
*/var _hsq = window._hsq = window._hsq ||[];
_hsq.push(["identify",{
email:getParameterByName("email"),
favorite_color:'orange'}]);