Answered

Add GTM intergration with the Update API

  • 9 February 2023
  • 1 reply
  • 31 views

Userlevel 5
Badge +5

Trying to see If I can add a Google Tag Manager (GTM) to my forms automatically using the API, to avoid missing it when duplicating form.

 

I tried the following:

 

1) Retrieve the form JSON object using 

GET https://api.typeform.com/forms/:form_id

 

2) Modify the JSON received to add the "google_tag_manager" parameter with my tag ("GTM-MYTAG") into the "settings" part of the JSON. I saw on other forms that had the integration that this is the parameter that was added, so I figured out I will try to add it through the API.

 

3) Update the form using and the modified JSON

PUT https://api.typeform.com/forms/:form_id

 

The API replies with the modified JSON, without error. Furthermore, subsequent attempts to retrieve the form using the GET method show the modified form JSON object.

 

Yet, when looking at the Typeform in the user interface, it shows no GTM connection, and when visiting the form, no GTM pixel is loaded.


Am I missing something?

icon

Best answer by Liz 9 February 2023, 21:30

View original

1 reply

Userlevel 7
Badge +5

Hi @jeremielp Happy little Friday! Thankfully, you aren’t missing something, but I do have some that I just discovered. The tech team let me know that, while it used to be possible to add integrations via API, this is no longer a feature. This is because if you had installed the integration via the API, it wouldn’t appear in the Connect panel, so they’ve removed this option overall. 

You’ll need to add any integrations in the builder itself. 

Hopefully that helps a little!

Reply