Spektrix ecommerce tracking on Plausible Custom Event Sales
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- analytics, documentation
Research direction
No repository file or test is identified. Start by reviewing the existing Plausible custom-event guidance and the Spektrix order-confirmation data layer; done means the documentation explains how to map purchase revenue and the listed properties into one Sales event without per-show code.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- CSS
- Stars
- 429
- Forks
- 275
- Avg merge
- 3m
- Merged PRs (30d)
- 16
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plausible/docs
-
Traefik Proxy Guide Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/OrgExplorer#245 · 1 assignee ·
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gordonwatts/test-wsl2-llm#151 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100