Is Tracking Pixel integration the best way to move data from GTM to Mautic?

Hi all,



We are using Mautic (v 1.2.4) (congrats for the fantastic work!), and we want to integrate information that comes from Google Tag Manager (GTM) to complete lead information. Concretely our use case is: We want to track which leads do signup in our platform (the signup form doesn’t belong to mautic). In order to integrate signup information with multiple platforms (Google Analytics, Mixpanel, and now Mautic) we expose all the information we want to track in a GTM event (via GTM data layer).



We successfully can use the Mautic Tracking Pixel (mtracking.gif) to track this information, passing the lead parameters as tracking pixel’s params and setting “Publicly updatable”, in the managed fields section, for all the lead fields we want to update in Mautic from GTM.



However our approach has some Cons:

  • Mautic registers a Page Hit event (which is not the event we want / were expecting)
  • We didn’t find a way to register a boolean (signup lead field that says if a lead has signup in our product) in a Mautic workflow/form/campaign, i.e. the only way we found to register that field was to pass as mtracking parameter signup=1 (signup is the lead field alias)
  • We have to expose our Mautic internal structure, whereas with forms (for example), Mautic give us the flexibility to do the field mapping in an interface



    – see: Mautic Event Screenshot



    As an alternative we also tried to make this integration submitting via AJAX the same payload a Mautic form would do. However we ran in several problems:
  • Mixed Content: The page at ‘https://<product.domain>/’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://<mautic.domain>/form/submit?formId=6’. This request has been blocked; the content must be served over HTTPS.
  • XMLHttpRequest cannot load http://<mautic.domain>/form/submit?formId=6. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘<other.domain.in.http>’ is therefore not allowed access.



    What’s the best way to integrate Mautic in our case? What do you recommend us to do?



    Also, I tried to find a Mautic JS API that could expose form submission and lead tracking functionality, but I was unable to find one. Is there any Mautic JS API?



    Thank you,

    Vasco

Hi all,

We are using Mautic (v 1.2.4) (congrats for the fantastic work!), and we want to integrate information that comes from Google Tag Manager (GTM) to complete lead information. Concretely our use case is: We want to track which leads do signup in our platform (the signup form doesn’t belong to mautic). In order to integrate signup information with multiple platforms (Google Analytics, Mixpanel, and now Mautic) we expose all the information we want to track in a GTM event (via GTM data layer).

We successfully can use the Mautic Tracking Pixel (mtracking.gif) to track this information, passing the lead parameters as tracking pixel’s params and setting “Publicly updatable”, in the managed fields section, for all the lead fields we want to update in Mautic from GTM.

However our approach has some Cons:

  • Mautic registers a Page Hit event (which is not the event we want / were expecting)
  • We didn’t find a way to register a boolean (signup lead field that says if a lead has signup in our product) in a Mautic workflow/form/campaign, i.e. the only way we found to register that field was to pass as mtracking parameter signup=1 (signup is the lead field alias)
  • We have to expose our Mautic internal structure, whereas with forms (for example), Mautic give us the flexibility to do the field mapping in an interface

– see: Mautic Event Screenshot

As an alternative we also tried to make this integration submitting via AJAX the same payload a Mautic form would do. However we ran in several problems:

  • Mixed Content: The page at ‘https://<product.domain>/’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://<mautic.domain>/form/submit?formId=6’. This request has been blocked; the content must be served over HTTPS.
  • XMLHttpRequest cannot load http://<mautic.domain>/form/submit?formId=6. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘<other.domain.in.http>’ is therefore not allowed access.

What’s the best way to integrate Mautic in our case? What do you recommend us to do?

Also, I tried to find a Mautic JS API that could expose form submission and lead tracking functionality, but I was unable to find one. Is there any Mautic JS API?

Thank you,
Vasco

Check https://medium.com/@jan_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005