adding contact with api and associate to google ads campaing

Hi!

We have a custom form on our website, and after submission we use the husbpot api to send the new contact. The problem that we are having is that we need to associate the contact to adwords campaing. Our Google ads acocunt is already linked to hubspot, in fact we have other websites with the hubspot form and they are working properly.

On the payload we try to push data to the hs_analytics_source_data_1 and hs_latest_source_data_1 but both are read_only.

So its possible to attribute the contact to the google ads campaing? Is there any workaround?

Please let me know if there are any more details that I can give. Any advice would be much appreciated. Thanks!

I think you need to setup the ad conversion in HubSpot and then the tracking code on the website will log it when the form is submitted. Here’s a knowledge base article I think will help explain it: Create form submission ad conversion events

One part of this I’d double check is to make sure you’re submitting to the Forms API and not directly to the contact record, so the submission logs as a forms submission event.