# adding contact with api and associate to google ads campaing

**URL:** <https://community.hubspot.com/t/adding-contact-with-api-and-associate-to-google-ads-campaing/108604>\
**Category:** APIs & Integrations\
**Tags:** php\
**Created:** [June 4, 2024, 1:37pm UTC](https://community.hubspot.com/t/adding-contact-with-api-and-associate-to-google-ads-campaing/108604 "2024-06-04T13:37:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSFav](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@MSFav](https://community.hubspot.com/u/MSFav)\
**Post date:** [June 4, 2024, 1:37pm UTC](https://community.hubspot.com/t/adding-contact-with-api-and-associate-to-google-ads-campaing/108604/1 "2024-06-04T13:37:17Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Bortami](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bortami/32/221350_2.png) [@Bortami](https://community.hubspot.com/u/Bortami)\
**Post date:** [June 5, 2024, 4:12pm UTC](https://community.hubspot.com/t/adding-contact-with-api-and-associate-to-google-ads-campaing/108604/2 "2024-06-05T16:12:39Z")

</div>

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](https://knowledge.hubspot.com/ads/create-and-sync-ad-conversion-events-with-your-google-ads-account?hubs_content=knowledge.hubspot.com/ads/track-and-report-on-google-ads-in-hubspot&hubs_content-cta=related-content-body#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.
