• Hi Killian;

    Great plugin and working all fine.

    There is a little problem for WC variable products. Plugin can’t detect the variable products SKU.

    SKU Parameter is empty in var tracktasticProductData like:

    var tracktasticProductData = {“sku”:””,”name”:”Blah Blah”,”categoryList”:”etc”,”price”:”129000000″};

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Killian Santos

    (@killiansantos)

    Hi @e12ror,

    Thank you for your feedback on the plugin and glad to hear it works well for you.

    Regarding variable products:

    1. Could you please check on the cart page if the SKU is displayed correctly?
    2. Do you have an example URL?

    Best regards,

    Killian

    Thread Starter moghaddamhreza

    (@e12ror)

    1. Yes, all SKU, price and inventory options are displayed and working fine for products.
    2. Check this variable product for example: https://soo.is/2cN8G
    <script type="text/javascript" id="tracktastic-product-tracking-js-extra">/* <![CDATA[ */var tracktasticProductData = {"sku":"","name":"\u062f\u0648\u0686\u0631\u062e\u0647 \u06a9\u0648\u0647\u0633\u062a\u0627\u0646 SCOTT Scale 965 2024","categoryList":"\u062f\u0648\u0686\u0631\u062e\u0647 \u06a9\u0648\u0647\u0633\u062a\u0627\u0646","price":"129000000"};/* ]]> */</script>
    Thread Starter moghaddamhreza

    (@e12ror)

    This code is in source-code of cart page:

    <script type="text/javascript" id="tracktastic-matomo-cart-tracking-js-extra">/* <![CDATA[ */var tracktasticCartData = {"items":[{"sku":"121248","name":"\u062f\u0648\u0686\u0631\u062e\u0647 \u06a9\u0648\u0647\u0633\u062a\u0627\u0646 SCOTT Scale 965 2024","category":"","price":"129000000","quantity":1}],"cartTotal":"128970000"};/* ]]> */</script>

    but nothing in the checkout page.

    Plugin Author Killian Santos

    (@killiansantos)

    1/ Sorry, I meant at the script level. So at this point, the SKU is correctly integrated into the cart page script.

    2/ For this variable product, once the product is added to the cart and on the cart page, the SKU is properly populated:

    <script type="text/javascript" id="tracktastic-matomo-cart-tracking-js-extra">/* <![CDATA[ */var tracktasticCartData = {"items":[{"sku":"121248","name":"\u062f\u0648\u0686\u0631\u062e\u0647 \u06a9\u0648\u0647\u0633\u062a\u0627\u0646 SCOTT Scale 965 2024","category":"","price":"129000000","quantity":1}],"cartTotal":"128970000"};/* ]]> */</script>

    => On the product page, the SKU is empty because it is not generally assigned; it is only populated variation by variation at the cart stage.

    3/ For the “Order Confirmation” page, it is normal that no script is present; these scripts are included on the following pages: product page, product category page, cart, and once the order is confirmed.

    4/ In your report “E-commerce > Products > Product Code,” are SKUs showing up correctly? On my end, the test I just repeated was successful (with a variable product).

    Thread Starter moghaddamhreza

    (@e12ror)

    1. Yes it’s correctly integrated in pages.
    2. Yes it is.
    3. That’s ok
    4. Theres is no products in SKU tab. Results from earlier this morning:

    Product Name: https://snipboard.io/n2L67u.jpg

    Product SKU: https://snipboard.io/zLRqFl.jpg

    Plugin Author Killian Santos

    (@killiansantos)

    Ok, so the extension script seems to be correctly in place; however, the SKUs are not showing up in the Matomo interface.

    Could you please check your browser console? I see the following error:
    “Refused to load the script ‘https://<MATOMO INSTANCE>/matomo.js ‘ because it violates the following Content Security Policy directive: “default-src ‘self’ ‘unsafe-inline’ ‘unsafe-eval'”. Note that ‘script-src-elem’ was not explicitly set, so ‘default-src’ is used as a fallback.”

    Thread Starter moghaddamhreza

    (@e12ror)

    Content Security Policy is added recently and it’s browser side thing I think.

    However I’ve unset this header in server side, and will report the results tomorow.

    Thanks for your time.

    Thread Starter moghaddamhreza

    (@e12ror)

    As you said, problem was the CSP rules.

    Thanks for your time <3

    Plugin Author Killian Santos

    (@killiansantos)

    Great! I’m glad everything is in order and that the Tracktastic plugin is useful to you.

    If you could leave a review on the directory, it would be greatly appreciated 🙂

    Thread Starter moghaddamhreza

    (@e12ror)

    Done

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘SKU’ is closed to new replies.