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)

  • Name
    content_id
    Description

    Unique public facing ID for the content that event is triggered from.

  • Name
    content_title
    Description

    Title for the content that event is triggered from.

  • Name
    url
    Description

    URL of the page containing the content.

  • Name
    utm_campaign
    Description

    The utm_source campaign that you added to the content. If you did not add it, it will be ""

  • Name
    utm_medium
    Description

    The medium parameter that you added to the content. If you did not add it, it will be ""

  • Name
    utm_source
    Description

    The utm_source parameter that you added to the content. If you did not add it, it will be ""

  • Name
    source
    Description

    Poltio product type (widget / embed)

  • Name
    poltio_session_source
    Description

    Poltio product type (widget / embed)

Start

  {
      "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",
      "source": "frame",
      "poltio_session_source": "widget",
  }

Vote

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

  • Name
    answer_id
    Description

    Unique identifier for the answer voted by the voter.

  • Name
    answer_count
    Description

    Number of answers voted. If question is not multi punch, it will be 1.

  • Name
    answer_number
    Description

    Voted answer number of answers in question.

  • Name
    answer_title
    Description

    Answer Title

  • Name
    question_id
    Description

    Unique Question ID for the question.

  • Name
    question_number
    Description

    Voted question number of questions in content.

  • Name
    question_title
    Description

    Question title of answered question.

  • Name
    poltio_session_source
    Description

    Poltio product type (widget / embed)

Vote

  {
      "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",
      "source": "frame",
      "poltio_session_source": "widget",
  }

Result View

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

  • Name
    result_id
    Description

    Unique identifier for the result seen by the voter.

  • Name
    result_number
    Description

    Result number of result in the results

  • Name
    result_url
    Description

    Result Url

Result View

  {
      "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",
      "source": "frame",
      "poltio_session_source": "widget",
  }

Result Click

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

  • Name
    from
    Description

    Where the url was clicked (button or image)

Result Click

  {
      "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",
      "source": "frame",
      "poltio_session_source": "widget",
  }

XP Click Events

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

This example is for the start step.

Start

  {
      "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",
  }

This example is for the question step.

Question

  {
      "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",
  }

This example is for the result step.

Result

  {
      "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