Git Product home page Git Product logo

eec-for-squarespace's People

Contributors

efficiencyjunky avatar

Stargazers

sean dreilinger avatar RafD avatar  avatar

Watchers

 avatar RafD avatar

eec-for-squarespace's Issues

Add ability to track if a discount was applied, how much, and if there was free shipping

To do this we need to make the following modifications

GOOGLE ANALYTICS CUSTOM DIMENSIONS / METRICS
Dimensions:

  • Order Discount Status
  • Free Shipping

Metrics:

  • Order Discount Amount

MODIFY CODE IN: 01_ss_rawTransactionPush.html
Needs to push this object to dataLayer

discount = {
	'status': (discountAmount < 0) ? "Discount Applied" : "No Discount",
	'amount': (discountAmount < 0) ? discountAmount / 100 : 0,
	'freeShipping': (shippingTotal == 0) ? "Yes" : "No"
}

GTM DL VARIABLES
DL - EEC Purchase - Discount Status -> discount.status
DL - EEC Purchase - Discount Amount -> discount.amount
DL - EEC Purchase - Free Shipping -> discount.freeShipping

TAG MODIFICATION
Add Custom Dimensions / Metric to Purchase tag

  • Custom Dimensions:
    • Index 4 - Dimension Value: {{DL - EEC Purchase - SS Transaction ID}}
    • Index 8 - Dimension Value: {{DL - EEC Purchase - Discount Status}}
    • Index 9 - Dimension Value: {{DL - EEC Purchase - Free Shipping}}
  • Custom Metrics:
    • Index 2 - Metric Value: {{DL - EEC Purchase - Discount Amount}}

add variant information to productJSON and eec objects

we only need to grab the variant information from the add to cart object and turn it into a single string
then we need to add this to our variantsAddedToCart cookie as another parameter
we can then use this cookie throughout the funnel

Add label to Checkout Tag

For the checkout tag, it would be nice to add a label that gives an overview of the items in the cart at time of checkout.

Possibly the number of items and total value?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.