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

  • If you use iframe and sdk, we automatically push the relevant parameters to the dataLayer in events (start, vote, result_view, result_click and xp_click).

  • If you are using a direct link or have a custom datalayer name, you can make edits under GTM integration on the platform.

Example PixelCode

   <img src="https://<domain>/event" width="1" height="1" />

Parameters

Parameters

  • Name
    parent_page_url
    Description

    If you want to recieve the page url you embedded the Poltio Widget, you can use this parameter. The url will be automatically escaped. If you use widget url directly instead of embedding it to your page OR use in-app browser to load our Widget, the widget direct url with all the Query String parameters you used will be returned.

  • Name
    content_id
    Description

    Poltio internal Unique identifier for the Content. You can use this parameter to uniquely identify the contents in your system if you have that need. This will be a string.

  • Name
    content_title
    Description

    The Content Title that the triggered.

  • Name
    question_id
    Description

    Poltio internal Unique identifier for the Question. You can use this parameter to uniquely identify the questions in your system if you have that need. This will be an unsigned big integer

  • Name
    question_title
    Description

    The Question Title that the triggered.

  • Name
    question_number
    Description

    Question number for the trigger question. (3rd question or 4th question)

  • Name
    answer_id
    Description

    Poltio internal Unique identifier for the Answer. You can use this parameter to uniquely identify the answers in your system if you have that need. This will be an unsigned big integer

  • Name
    answer_title
    Description

    The Answer Title that the triggered.

  • Name
    answer_number
    Description

    Answer number for the trigger question. (3rd answer or 4th answer)

  • Name
    result_id
    Description

    Poltio internal Unique identifier for the Result. You can use this parameter to uniquely identify the results in your system if you have that need. This will be an unsigned big integer.

  • Name
    result_title
    Description

    The Result Title that the triggered.

  • Name
    result_number
    Description

    Result number for the trigger result. (3rd result or 4th result)

  • Name
    from
    Description

    This parameter comes only in the result_click action. Indicates that the result was clicked on the image or button. (eg: from: "image" or from: "button")

  • The following parameters can only come in xp content.

  • Name
    xp_click_step
    Description

    It indicates at what step the click is. (start, question, result)

  • Name
    xp_click_id
    Description

    The product shown in the widget may be different from the product shown in XP. In this case, result_id will be the id of the product shown in the widget, while xp_click_id will be the id of the product shown in xp. If they are the same, they will also be the same. (eg: result_id: "The id of the product shown in the widget", xp_click_id: "The id of the product shown in the xp")

  • Name
    xp_click_title
    Description

    Title of the clicked product or label of the button. (It depending on the click step.)

  • Name
    xp_click_url
    Description

    URL of the product shown in xp or URL of the referring page.


Payload Examples

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

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