Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

eCommerce Products not showing up

$
0
0

@d4mer wrote:

Hi there,

I have been trying to get ecommerce to work with Shopify and while visit tracking, orders and the cart are working, I cannot get products to show up. Here is the code I’m using:

 <!-- Piwik Product  -->
<script type="text/javascript">
  var _paq = _paq || [];

  // all parameters are optional, but we recommend to set at minimum productSKU and productName
  _paq.push(['setEcommerceView',
  "{{ product.selected_or_first_available_variant.sku }}", // (required) SKU: Product unique identifier
  "{{ product.title }}", // (optional) Product name
  "{% for collection in product.collections %}
    {{ collection.title }}
{% endfor %}", // (optional) Product category, or array of up to 5 categories
  {{ product.price | money_without_currency }} // (optional) Product Price as displayed on the page
  ]);

  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);

(function() {
    var u="//maverick.eduardoarellano.com/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '9']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//maverick.eduardoarellano.com/piwik.php?idsite=9&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

and this is the output when I view source on the product page:

  <!-- Piwik Product  -->
<script type="text/javascript">
  var _paq = _paq || [];

  // all parameters are optional, but we recommend to set at minimum productSKU and productName
  _paq.push(['setEcommerceView',
  "7589996-beads-k", // (required) SKU: Product unique identifier
  "Charm de Nuestra Inicial Abalorio Bañado en Plata de la A a la Z", // (optional) Product name
  "
Para tu Pandora
", // (optional) Product category, or array of up to 5 categories
  10.20 // (optional) Product Price as displayed on the page
  ]);

  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);

(function() {
var u="//maverick.eduardoarellano.com/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '9']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//maverick.eduardoarellano.com/piwik.php?idsite=9&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

It seems to be working but it isn’t getting sent to piwik.

Any help would be greatly appreciated.

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles