Skip to content

Instantly share code, notes, and snippets.

@jamesrichards
Created December 3, 2019 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesrichards/7321b30b4289862a4573bf292c305a19 to your computer and use it in GitHub Desktop.
Save jamesrichards/7321b30b4289862a4573bf292c305a19 to your computer and use it in GitHub Desktop.
Dot Tag Event - Booking Confirmed
window["dotq"] = window["dotq"] || [];
window["dotq"].push({
projectId: "10000",
properties: {
pixelId: "10093616",
qstrings: {
et: "custom",
ec: "Booking Confirmation",
ea: "Purchase",
el: "Booking ID: " + this.props.booking.bookingResponse.bookingDetails.bookingId,
ev: "Total: " + this.props.booking.bookingResponse.transactions[0]
.transactionTotal,
gv: "n/a",
// This last line just includes the product Sku if it's available, otherwise it just returns 'no sku available'
product_id: this.props.booking.bookingResponse.transactions[0].transactionProducts.sku ? this.props.booking.transactions[0].transactionProducts.sku : 'No Product Sku Availale'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment