Email Sign Up Tracking

Learn about how to track email and SMS sign ups!

Overview

Included in Data Layer versions 3.4+ is a data layer event to capture email & SMS sign ups: dl_subscribe.


Triggers

This event will fire when a shopper signs up for email via the native Shopify Footer. It'll also capture email & SMS sign ups via Klaviyo pop-ups, Attentive pop-ups and Postscript pop-ups.

  • If you are using Amped.io, you will need follow this guide to enable the Elevar Integration inside of your Amped platform and then the dl_subscribe event will start firing automatically.
  • If you are using Convertflow, you will need to follow this guide inside of your Convertflow platform to trigger the dl_subscribe event upon email sign up.
  • If you are using Justuno, you will need to follow this guide to learn how to set up Justuno Email Submission Listener for Data Enrichment.

👍

Don't see your email provider on the above list?

We'd love to integrate with them, but we need their buy-in (which you can influence!). Ask your email signup software provider to connect with Elevar's Product team by emailing [email protected] to learn about Elevar's integration requirements.


Example Schema

Example data layer event schema for email sign ups:

{
   "event_id": "40f18e7b-2735-4c78-894f-49bba265e823",
   "event_time": "2023-05-23T18:48:06.867Z",
   "event": "dl_subscribe",
   "lead_type": "email",
   "user_properties": {
      "customer_email": "[email protected]"
   },
   "gtm.uniqueEventId": 15
}

Example data layer event schema for SMS sign ups:

{
   "event_id": "5af89e7b-fd72-4b0a-a922-44e0b3a854c3",
   "event_time": "2023-05-23T18:48:34.858Z",
   "event": "dl_subscribe",
   "lead_type": "phone",
   "user_properties": {
      "customer_phone": "+11111111111"
   },
   "gtm.uniqueEventId": 16
}

Differentiating Between SMS vs Email Sign Ups

By default, the email sign up events in your Facebook & Pinterest tracking will fire a lead event on email sign ups only.

  • If you'd like to track SMS sign ups for Google Analytics, Facebook, etc, you can fire a custom event in your Google Tag Manager Container using the Event - subscribe - phone trigger
    • This is available in the latest version of your Facebook or Pinterest web tags.
      • (See Figure 1)

Step 1 screenshot

Figure 1

Example Data Layer Event Schema:

  • The trigger looks for if the lead_type contains phone on the data layer event.
    • (See Figure 2)

Step 2 screenshot

Figure 2


Headless

For our headless customers, the dl_subscribe event will automatically fire on your headless storefront for the noted email softwares after you've installed the Non-Shopify Attribution Tracking Script.


Pushing Your Own Events

If your email form events aren't being picked up by Elevar's data layer, you can push these events manually.

  • When an email subscribe or sms subscribe occurs run the following code
// For email submissions
window.ElevarDataLayer.push({
	event: "dl_subscribe",
  lead_type: "email",
  user_properties: { customer_email: "[email protected]" }
})

// For phone submissions
window.ElevarDataLayer.push({
	event: "dl_subscribe",
  lead_type: "phone",
  user_properties: { customer_phone: "7809510883" }
})
  • You can do this directly in your codebase or from your Google Tag Manager web container mapping to your email variable and trigger(s) that fire when an email is submitted.
    • (See Figure 3)

Figure 3

Troubleshooting:

  • You can confirm both approaches work by examining the network tab after running this code, searching for elevar, and making sure you see a "dl_subscribe" event being sent to with the appropriate lead type, phone and email.