Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-3320

Add a new dataLayer field (Goal) on Form Block backend

    XporterXMLWordPrintable

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Should have
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.53, 1.54
    • Labels:
    • Environment:

       

    • Story Points:
      2
    • Sprint:
      Sprint #87, Sprint #88
    • Section:
      Analytics, Block: EN Form
    • P4 site:
      All sites
    • Track:
      Development

      Description

      User stories

      • As an admin, I want to select the form goal on the backend (e.g Petition Signup, Action Alert, Contact Form, Other).
      • As a data analyst, I want to have a cleaner setup on Google Tag Manager  

      Description

      1. Create a new dropdown field on the Form Backend.

      Field name: Goal
      Dropdown values: [list here

       

      1. Send a dataLayer event with parameters defined on the backend:

      Embed a dataLayer.push once the form is submitted. This will send the parameters (values) that were selected by the user on the dropdown field “Goal”: 

      Important: This value should be submitted together with the dataLayer event 'petitionSignup' after form submission. There's no need to implement this on page load. 

       

      dataLayer.push({

      'gGoal’ : ‘[value defined in Goal field]’,

      });

       

      This is related to the previous ticket: https://jira.greenpeace.org/browse/PLANET-3208

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                pcuadrad Pablo Cuadrado
                Reporter:
                jmarubay Julia Marubayashi
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: