Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spektrix ecommerce tracking on Plausible Custom Event Sales #431

Open
BluestormDigital opened this issue Sep 20, 2023 · 0 comments
Open

Comments

@BluestormDigital
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant