You have no items in your shopping cart.

Sunday, January 16, 2022 8:57:17 PM

dataLayer PageType:ProductPage on custom controllers

Avatar

Posted: 2 years ago

#9247 Quote

Scott

Posted: 2 years ago

#9247 Quote

Hello,

Is there a way to inject the tracking code on custom controllers/actions?

In other words it seems like it's only pushing the PageType.ProductPage dataLayer variable on pages that have a controller name of Product and action name of ProductDetails.

We have some custom controllers/actions that we'd like to inject the ProductPage code on but there doesn't seem to be a way to do that currently.

For example we can name our custom controller action ProductDetails as well and have it inject only based on action (rather than controller + action) if that's a feasible solution on your end.

Thanks
Avatar

Posted: 2 years ago

#10134 Quote

rdantonio

Posted: 2 years ago

#10134 Quote

I noticed this was added but not sure how to use. I tried this in the Custom MVC Routes field: CheckoutCompleted=CustomCheckoutController:CustomComplete and it did not work to show the dataLayer for our custom order complete page. Is my syntax incorrect or is there something I'm missing to get this working for order complete pages? Thanks
Avatar

Posted: 2 years ago

#10138 Quote

Support

Posted: 2 years ago

#10138 Quote

1. I added support custom Controller and Action.
Create the Custom template and configure it.

2. About new feature mapping nopcommerce controller and action to custom controller and action.
One of customer asked me to add it.
I prepared for it but this feature wasn't implemented it.
I didn't have free time.
Avatar

Posted: 5 months ago

#11485 Quote

vlaco

Posted: 5 months ago

#11485 Quote

Hi,

    I have tried your solution for a Custom template, and it works, the configuration shows up on the page with custom controller but the tokens are not working. %ProductId% shows up as empty and %CustomerEmail%, for example, just reads as a string. Any help with this?
Avatar

Posted: 5 months ago

#11486 Quote

Support

Posted: 5 months ago

#11486 Quote

The token %ProductId%  works only product details page, I read it from the model of this cshtml page


%CustomerEmail%
Did you use the registered customer?
Avatar

Posted: 5 months ago

#11487 Quote

vlaco

Posted: 5 months ago

#11487 Quote

Yes, it was a registred user. And it was on product details page, I just changed the controller to our custom controller for products. the script shows up on the page, except the tokens are not working.
Avatar

Posted: 5 months ago

#11488 Quote

Support

Posted: 5 months ago

#11488 Quote

I did the new release, upgrade the plugin, you will be able to use tokens with any controllers. Try and write to me about the result.
Avatar

Posted: 5 months ago

#11489 Quote

vlaco

Posted: 5 months ago

#11489 Quote

Can I see it in the trial version too? When I install it it says version 1.41
I am using the trial version to check if it gets the job I need done before I buy it.
Avatar

Posted: 5 months ago

#11490 Quote

Support

Posted: 5 months ago

#11490 Quote

Yes, download it from our site.
I didn't change the release number.
Avatar

Posted: 5 months ago

#11491 Quote

vlaco

Posted: 5 months ago

#11491 Quote

The result is still the same
Avatar

Posted: 5 months ago

#11492 Quote

Support

Posted: 5 months ago

#11492 Quote

Did you create the custom tracking code (the type Custom)
and you selected the "Include in pages" - Products?
Avatar

Posted: 5 months ago

#11493 Quote

vlaco

Posted: 5 months ago

#11493 Quote



I did, am I doing something else wrong?
Avatar

Posted: 5 months ago

#11494 Quote

Support

Posted: 5 months ago

#11494 Quote

Can you give me access to this store?
Avatar

Posted: 5 months ago

#11495 Quote

vlaco

Posted: 5 months ago

#11495 Quote

Unfortunately I cannot, but you can see my setup here https://ibb.co/pzDVnXv
Avatar

Posted: 5 months ago

#11496 Quote

Support

Posted: 5 months ago

#11496 Quote

Please try the new release again

Powered by nopCommerce

Copyright © 2019 FoxNetSoft. All rights reserved