You have no items in your shopping cart.

Saturday, April 27, 2024 4:26:02 AM

Unpossibility to get ProductImpressions and Addtocart Datalayers

Posted: 5 years ago

#8567 Quote

carlosdga

Posted: 5 years ago

#8567 Quote
Hello!

Currently I have this plugin installed in my localhost and I´ve been playing with the demo version and everything works flawlessly, but it is impossible for me to get the datalayers from Product Impressions and the action from the user of add to cart. I have a personalized theme for my web and it might be related with the problem, but I tried enabling the default one and it is not working neither.

Posted: 5 years ago

#8568 Quote

carlosdga

Posted: 5 years ago

#8568 Quote
I´ve been tryng to make it work but so far I have not being able to do it.

Do anyobdy know how to proceed to solve this problem?

I am very interested into this plugin because the rest of the data is being received smoothly.

Regards!

Posted: 5 years ago

#8573 Quote

Support

Posted: 5 years ago

#8573 Quote
Plugin has JS file googleeehelper.js.

If your theme has original nopcommerce css styles than plugin can replace events.

Example
Plugin tries to find all 'Add To Cart' buttons using this JS code.

        //addToCart
        $('.add-to-cart-button, .product-box-add-to-cart-button').each(function () {
            var productid = GoogleEEHelper._getProductId(this);
            if (productid > 0) {
                $(this).click({ productid: productid }, function (event) {
                    event.preventDefault();
                    GoogleEEHelper.AddToCart('addToCart', event.data.productid);
                });
            }
        });

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved