Google Tag Manager

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

Intro

While using Poltio in your page with default Widgets or Embeds with SDK, every user action (start, vote, result_view, result_click) is shared with the Google Tag Manager in your site. (via window.dataLayer)

If you use a custom dataLayer you can set it via platform under GTM section.

Payload Examples

  • Event name will be the same for all actions : poltioWidgetEngagement

Start

start is the action of the user pressing the start button in the content (if content has cover)

  {
      "event": "poltioWidgetEngagement",
      "action": "start",
      "content_id": "Example Content Id",
      "content_title": "Example Content Title",
      "url": "Exapmle Url",
      "utm_campaign": "utm_campaign",
      "utm_medium": "utm_medium",
      "utm_source": "utm source",
  }

Vote

vote is the action that takes place after the user answers the questions.

  {
      "event": "poltioWidgetEngagement",
      "action": "vote",
      "answer_count": "1",
      "answer_id": "1111111",
      "answer_number": "1",
      "answer_title": "Answer Title",
      "question_id": "1111111",
      "question_number": "1",
      "question_title": "Question Title",
      "content_id": "Example Content Id",
      "content_title": "Example Content Title",
      "url": "Exapmle Url",
      "utm_campaign": "utm_campaign",
      "utm_medium": "utm_medium",
      "utm_source": "utm source",
  }

Result View

result_view is the action when the user sees the result screen.

  {
      "event": "poltioWidgetEngagement",
      "action": "result_view",
      "result_id": "1",
      "result_number": "1",
      "result_title": "Result Title",
      "result_url": "Result Url",
      "content_id": "Example Content Id",
      "content_title": "Example Content Title",
      "url": "Exapmle Url",
      "utm_campaign": "utm_campaign",
      "utm_medium": "utm_medium",
      "utm_source": "utm source",
  }

Result Click

result_click is the action of the user clicking on the result url on the result screen

  {
      "event": "poltioWidgetEngagement",
      "action": "result_click",
      "result_id": "1",
      "result_number": "1",
      "result_title": "Result Title",
      "result_url": "Result Url",
      "content_id": "Example Content Id",
      "content_title": "Example Content Title",
      "url": "Exapmle Url",
      "from": "button",
      "utm_campaign": "utm_campaign",
      "utm_medium": "utm_medium",
      "utm_source": "utm source",
  }

With the xp_click action, you can track click actions performed outside the widget in the XP content.

xp_click. This example is for the start step.

  {
      "event": "poltioWidgetEngagement",
      "action": "xp_click",
      "content_id": "Example Content Id",
      "content_title": "Example Content Title",
      "utm_campaign": "utm_campaign",
      "utm_medium": "utm_medium",
      "utm_source": "utm source",
      "xp_click_step": "start",
  }

xp_click. This example is for the question step.

  {
      "event": "poltioWidgetEngagement",
      "action": "xp_click",
      "question_id": "1111111",
      "question_number": "1",
      "question_title": "Question Title",
      "content_id": "Example Content Id",
      "content_title": "Example Content Title",
      "utm_campaign": "utm_campaign",
      "utm_medium": "utm_medium",
      "utm_source": "utm source",
      "xp_click_step": "question",
      "xp_click_title": "Visit Poltio.com",
      "xp_click_url": "https://www.poltio.com",
  }

xp_click. This example is for the result step.

  {
      "event": "poltioWidgetEngagement",
      "action": "xp_click",
      "result_id": "The id of the product shown in the widget",
      "result_title": "Result Title",
      "result_url": "Result Url",
      "content_id": "Example Content Id",
      "content_title": "Example Content Title",
      "utm_campaign": "utm_campaign",
      "utm_medium": "utm_medium",
      "utm_source": "utm source",
      "xp_click_id": "The id of the product shown in the xp",
      "xp_click_step": "result",
      "xp_click_title": "Title of the clicked product",
      "xp_click_url": "Url of the clicked product",
  }

How to Track on Analytics

Reference