You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking to add in coding to track 'Sales' custom event to all purchases made on our Spektrix data layer. For example, we have this coding currently, which is bringing the number of times a sale has been made but cannot track the revenue through.
But we do not want to apply individual coding for each show as we are promoting over 50 shows. Is there a way to use the Spektrix data layer to pull through revenue data and all custom properties (of which we want to track item_variant, item_category, item_category2, item_category3, shipping, items, value, transaction_id, item_id, coupon, discount, quantity, price, item_name) from the order confirmation page using the custom Specktrix data layer and their variables - perhaps into something like this:
I'm looking to add in coding to track 'Sales' custom event to all purchases made on our Spektrix data layer. For example, we have this coding currently, which is bringing the number of times a sale has been made but cannot track the revenue through.
<script> window.plausible("Sales", {revenue: {currency: "GBP", value: 1.00}}); </script>But we do not want to apply individual coding for each show as we are promoting over 50 shows. Is there a way to use the Spektrix data layer to pull through revenue data and all custom properties (of which we want to track item_variant, item_category, item_category2, item_category3, shipping, items, value, transaction_id, item_id, coupon, discount, quantity, price, item_name) from the order confirmation page using the custom Specktrix data layer and their variables - perhaps into something like this:
<script> window.plausible("Sales", {revenue: {currency: "GBP", amount: {value} }}); {props: {item_variant: {item_variant}, item_category: {item_category}, item_category2: {item_category2}, item_category3: {item_category2}, shipping: {shipping}, items: {items}, value: (value}, transaction_id: {transaction_id}, item_id: {item_id}, coupon: {coupon}, discount: {discount}, quantity: {quantity}, price: {price}, item_name: {item_name} </script>To also attach the custom properties to the snippet, do I use the same variables set up too?
I feel like there needs to be another element to the coding e.g. datalayerpush etc. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: