Create Goal for Sale of One Specific Product?

Hello,

Is it possible to create a goal from the sale of a specific product? It’s for a Shopify store.

Hi David!

It should be fairly easy if your Shopify store exposes the product name in some way - e.g. in the dataLayer.

You could then create a Piwik PRO Tag Manager variable that pulls the product name from the dataLayer. Once you have done that, you can use the variable in the trigger conditions. It should look something like this:

This trigger can then be used to convert the goal via Piwik PRO Tag Manager.

1 Like

@anthonybartczak

Apologies for the slow delay, I’ve been on vacation. This is what I’m seeing in the data layer for the product name of β€œ7 Steps to Success” Can you tell me exactly what the product name is in the datalayer?

  • |event|stg.timer|
    | β€” | β€” |
    |timeOnWebsite|120 sec|
    |skipExtendSession|true|
    |gtm.uniqueEventId|25|

  • |event|stg.leaveContent|
    | β€” | β€” |
    |edge|any|
    |gtm.uniqueEventId|24|

  • |event|stg.click|
    | β€” | β€” |
    |simulateDefault|true|
    |element|element|
    |elementId||
    |elementClasses|sc-jHkVzv kFoSDU pf-4_|
    |eventCallbackTimeout|500|
    |gtm.uniqueEventId|23|

  • |event|stg.leaveContent|
    | β€” | β€” |
    |edge|any|
    |gtm.uniqueEventId|22|

  • |event|stg.timer|
    | β€” | β€” |
    |timeOnWebsite|60 sec|
    |skipExtendSession|true|
    |gtm.uniqueEventId|21|

  • |event|stg.timer|
    | β€” | β€” |
    |timeOnWebsite|30 sec|
    |skipExtendSession|true|
    |gtm.uniqueEventId|20|

  • |event|stg.timer|
    | β€” | β€” |
    |timeOnWebsite|15 sec|
    |skipExtendSession|true|
    |gtm.uniqueEventId|19|

  • |event|stg.leaveContent|
    | β€” | β€” |
    |edge|any|
    |gtm.uniqueEventId|18|

  • |event|stg.timer|
    | β€” | β€” |
    |timeOnWebsite|5 sec|
    |skipExtendSession|true|
    |gtm.uniqueEventId|17|

  • |event|stg.timer|
    | β€” | β€” |
    |timeOnWebsite|3 sec|
    |skipExtendSession|true|
    |gtm.uniqueEventId|16|

  • |event|gtm.load|
    | β€” | β€” |
    |gtm.uniqueEventId|15|

  • |event|stg.pageLoad|
    | β€” | β€” |
    |gtm.uniqueEventId|14|

  • |event|cart_update|
    | β€” | β€” |
    |cart_amount|0|
    |- products|object|
    |gtm.uniqueEventId|13|

  • |0|event|
    | β€” | β€” |
    |1|view_item|
    |- 2|object|
    |.send_to|G-L2G850T4QM|
    |- .ecomm_prodid|array|
    |.0|shopify_US_6929481400510_40515397386430|
    |.ecomm_totalvalue|null|
    |.ecomm_pagetype|product|
    |- .items|array|
    |- .0|object|
    |.id|6929481400510|
    |.name|7 Steps to Success|
    |.brand|Crimson Cup Coffee|
    |.category|Books|
    |.price|69.99|
    |.variant|null|

  • 0 event
    1 page_view
    - 2 object
    .send_to G-L2G850T4QM
    .page_path /products/seven-steps-to-success-book
    .page_title 7 Steps to Coffee Shop Success How to Open a Coffee Shop – Crimson Cup Coffee
    .page_location https://shop.crimsoncup.com/products/seven-steps-to-success-book

  • |event|gtm.dom|
    | β€” | β€” |
    |gtm.uniqueEventId|10|

  • |0|config|
    | β€” | β€” |
    |1|G-L2G850T4QM|
    |- 2|object|
    |.send_page_view|false|

  • |0|js|
    | β€” | β€” |
    |1|2023-05-30T19:37:07.315Z|

  • |0|config|
    | β€” | β€” |
    |1|AW-948542101|

  • |0|js|
    | β€” | β€” |
    |1|2023-05-30T19:37:07.272Z|

  • |0|config|
    | β€” | β€” |
    |1|G-L2G850T4QM|

  • |0|js|
    | β€” | β€” |
    |1|2023-05-30T19:37:07.265Z|

  • |event|stg.domReady|
    | β€” | β€” |
    |gtm.uniqueEventId|3|

  • |event|stg.pageView|
    | β€” | β€” |
    |gtm.uniqueEventId||

Hi David!

From what I can see, you should be able to retrieve the product name by using a dataLayer variable that looks something like this:

You should then be able to create a trigger for your goal conversion:

@anthonybartczak,

Thanks so much for your assistance. Unfortunately, I can’t seem to wrap my head around variables. I draw a blank in this area!