How to track purchases of specific products as a goal

Comments

10 comments

  • Logan Mcbride

    Hi Ben,

    You can use the Wait For Event api to do what you are describing with events. Documentation is here. The idea being that you subscribe to events being sent to DY, check if the event is purchase, then if it matches your list of skus, if so then fire your single event. 

    Here is a quick example of what I think you're describing:

    Comment actions Permalink
  • Ben Zitney

    @... hahaha

    Well the reason I had to do a workaround is that a single style of ours -- like the Stryke Pant for example https://www.511tactical.com/stryke-pant.html -- can have like 400 separate skus because there's a different sku for each size/color combination. So loading up the list of skus for multiple products like in Logan's example would've been too much to maintain.

    But in our GTM dataLayer at the point of purchase we have a JSON object with all of the style numbers (ie group ids) included in the purchase. So basically instead of looping through the product ID array from the DY event, I'm looping through the JSON object of style numbers that we have in our dataLayer.

    Does that make sense? If group_id were accessible in the DY purchase properties, I would've just used Logan's example, but since it's not I used this workaround.

    Comment actions Permalink
  • Logan Mcbride

    Hey Ben Zitney

    You can use the getProductData api to get any data feed info about a product from the client-side. Here is an example that of how this would look on a product page, but you can run it on any page as long as you know the product sku:

     

     

    Comment actions Permalink
  • Jake Tenenbaum

    Hey Ben-

     

    A CSM here. 
    A quick and easy idea would be to create an audience based on the product(s) purchased. You can track this over time using the audience manager (i remind myself once a week to go back and record the last 7 days worth of data every 7 days) 

     

    Does this help?

    jake

    Comment actions Permalink
  • Ben Zitney

    Thanks & hey Logan Mcbride! I ended up not using this exact solution, but this sparked an idea of how I could get this done with GTM & just implemented it, and it appears to be working. Now I see why the call you Logan the Magnificent hahaha!

    Comment actions Permalink
  • Meira Farber

    Ben, you sure got it right about Logan :)

    Would you mind sharing your solution using GTM?

    Comment actions Permalink
  • Meira Farber

    Hi Ben, Yes this is great, thank so much for sharing. 

    It is possible to add a custom attribute of group_id, so if you need this in the future, @... or Logan Mcbride can give you the details.

    Comment actions Permalink
  • Ben Zitney

    @... How would you go about getting group_id or categories for a specific product that was purchased like you mentioned in your previous comment?

     

    cc:@... Logan Mcbride

    Comment actions Permalink
  • Ben Zitney

    Sorry I know I'm kinda wandering off-topic now, but is there a way to do a reverse-lookup where I can get a list of skus based on group_id?

    Comment actions Permalink
  • Logan Mcbride

    Unfortunately no

    Comment actions Permalink

Please sign in to leave a comment.