comicrelief / campaign

Comic Relief Campaign Distribution in Drupal 8
https://master-tx3mbsqmxtu74.eu.platform.sh/fundraise
GNU General Public License v2.0
22 stars 10 forks source link

Tracking Updates Required on CR.COM and SR.COM for Emarsys #1500

Closed phiral closed 4 years ago

phiral commented 5 years ago

Can we please implement the dataLayer in the file below:

The main requirement for this capturing the email address in the 'userEmail' field whenever someone enters their email address in a form on the website e.g. Email signups (ESU) or contact us or other forms. Once available can we make this available and propagate globally site-wide on each page or URL type.

See following for instructions: CR.com-and-SR.com_Global-Tracking-Instructions_20190716.txt

For information on why this is required please review the following Emarsys documentation: https://help.emarsys.com/hc/en-us/articles/360005884453-identifying-users-with-web-extend

AndyEPhipps commented 5 years ago

@phiral , the current implementation relates to the Drupal users, i.e, dev and content team:

Screen Shot 2019-09-26 at 13 04 22

The new updates:

    'user': {
          'id': 'user123456',               //optional if available - registered user id
          'loggedIn': 'Y',              //optional if available - Y or N
          'userEmail': 'examplename@somedomain.com' //required - set defualt value to 'N' and populate the email when it becomes available in the CR.COM user journey and propagate it site wide

        }
    }];

somehow adds a 'userEmail' in that, which doesn't really make any sense, if we're trying to capture visitor data.

When you say 'populate the email' , do you mean pre-populate any other email fields on site with one already supplied to an ESU.? And/or populate that DL 'userEmail' field in the DL object?

phiral commented 5 years ago

@AndyEPhipps to confirm on this:

We require a solution where we update the dataLayer ( 'userEmail': 'examplename@somedomain.com') when a user makes their email address available when submitting a form on the website (ESU's, Marketing Preference and ContactUs ...etc).

phiral commented 4 years ago

Done