Workflow

Google Tag Manager

With the poltio sdk, it pushes the parameters in the pixel code into the datalayer you have in the window.


How to Add

  • First you need to add poltio sdk to your page for GTM Relay
  • Create pixel code from platform.
  • Add your pixel code to events (in content edit)
  • You should add gtmRelay: true
  • gtmDl the datalayer name you are using (dataLayer, customDatalayer, ...).

After all this, you can reach the parameter you want with the ADDEventListener method.

Parameters

Same parameters as pixel code parameters

Example GTM Relay with PixelCode

<script>
  try {
    var postObject = JSON.parse(
      JSON.stringify({
        gtmRelay: true,
        gtmDl: 'dataLayer',
        gtmData: {
          event: 'your_event',
          action: 'start',
          form_name: '[content_title]',
          page: '[parent_page_url]',
        },
      })
    )
    parent.postMessage(postObject, '*')
  } catch (e) {
    window.console && window.console.log(e)
  }
</script>