How do I test all my product pages?
I'm new to Optimizely and I can't wait to run my first test.
I want to test the h1 title positioning on my product page.
I have issues with the url targeting because I can't obviously upload all the product urls.
I read that you can do something similar by selecting "Substring match" in the url selector and input the domain of the website.
Is that correct?
I also installed the JS snippet provided in ALL the pages of my website.
With this approach, I am sure that a user rthat visits the home page doesn't affect in any way the results?
Is there any more clean way?
the goal of this test is to track clicks on "Add to cart button". Is this tracking unique? I mean, if a user adds two products on cart in the same session, how this goal will be tracked? Once or twice?
There are several ways to do URL targetting, depending on your needs.
If you are OK with your experiment running on all pages, then you have a lot of flexibility, but your code must be specific enough to only affect your product pages, perhaps using a class on the <body> tag that is specific to only your PDP pages.
If you want an experiment to run on only certain pages of your site, you will need to discern a URL pattern that represents the page type.
I tend to use Regular Expressions for most of my URL targetting.
Can you share a handful of random product page URLs?
thank you for your quick reply.
Yes I figured out, I tried to match specific DOM elements that belong only to product pages.
I cant't give you any URL because there is no pattern. They could be like:
So you confirm that a user that visits a non-product page won't be calculated in the experiment?
What about my second question? Can you help me with that?
Not sure of the 2nd question - though a good question.
For the 1st question, I think you need to have all products within the product sub domain. That is:
And then use substring to identify products/ product.
unfortunately It's not possible for me to change URL scheme, but if you say that my approach is correct it is okay for me.
Every user who matches your URL pattern will be counted in your experiment results.
Another alternative, is to look into using "Conditional Activation" to activate the experiment. This way you could read the DOM of the page and activate the experiment only for those pages that have a specific element that appears only on your product page.
With this in place, your URLs would still target every page of your site, like you have it now.
The main drawback to this is that the delay (needing enough of the DOM to load for the element to be detected) may cause additional "flash" because the experiment will kick-in a few hundred milliseconds later than if you were able to use only URL targeting.
Unfortunately I don't have an enteprise plan.
It seems i have to manually upload all urls or move to another service.
Thank you so much for your support.