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

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

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Should have Should have
    • 1.53, 1.54
    •  

    • 2
    • Analytics, Block: EN Form
    • Sprint #87, Sprint #88

      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

            pcuadrad Pablo Cuadrado (Inactive)
            jmarubay Julia Marubayashi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: