Skip to content

Instantly share code, notes, and snippets.

@kmclaugh
Created June 29, 2021 12:29
Show Gist options
  • Save kmclaugh/325ad96fce275055dd643ab0dc5d1b0b to your computer and use it in GitHub Desktop.
Save kmclaugh/325ad96fce275055dd643ab0dc5d1b0b to your computer and use it in GitHub Desktop.

Below is the code that needs to be added when the user

  1. Submits a review
/*
* action: submit a review
* description: fire whenever a user submits a review
* url: https://www.rentcity.co/review/thankyou
* notes:
*/
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "reviewSubmit",
data: {
reviewInfo: {
neighborhood: "{{neighborhood}}",
}
userInfo: {
userId: "{{userId}}", // The user id if assigned
emailAddress: "{{emailAddress}}", // The user's email address
}
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment