How to Hide a Part of Page Url

kentico guy asked on November 5, 2020 22:56

Kentico 12

I am developing some custom code on top of the stock A/B testing system so that the A/B pages work with a custom homepage transformation. Is there a built-in way to mask the link in the URL bar? What I'm talking about is, say I have the following links:

https://xxxxxxx.com/Featured-Articles/AB_TESTING_TESTING_PT7_ORG/

https://xxxxxxx.com/Featured-Articles/AB_TESTING_TESTING_PT7_ORG/AB_TESTING_TESTING_PT7_A

https://xxxxxxx.com/Featured-Articles/AB_TESTING_TESTING_PT7_ORG/AB_TESTING_TESTING_PT7_B

If I am running the AB test I want all three of them to show up as

https://xxxxxxx.com/Featured-Articles/AB_TESTING_TESTING_PT7_ORG/

when the user is in the article. Is there a way to do this out of the box?

Recent Answers


Dmitry Bastron answered on November 6, 2020 12:16 (last edited on November 6, 2020 12:18)

Hi kentico guy,

No, there isn't such a way, you need to write some custom URL helper and use it in your solution instead of stock one.

But I must say, based on this and your previous questions (here and here) you are doing something really weird. It looks like you are trying to implement A/B test for journey (chain of pages and actions) rather than for just one page. But this could be solved much easier way if you mean it. Or do you want to randomly personalize things? Again, this should not be done via A/B testing. A/B testing is purely to optimize things (measure and select the winner).

Otherwise, your solution with URL parts is a terrible hit for SEO and tracking as you are using URL parts (you should have used URL parameters instead maybe?). Without canonical URLs it could also be a duplicated content and so on.

0 votesVote for this answer Mark as a Correct answer

kentico guy answered on November 6, 2020 16:34

This is an internal site so there is no SEO. Search engines should not be able to see any of these pages, as it's for an internal company site. Yeah, I agree it's odd but I shouldn't have even had to do all this. The issue is that A/B testing pages still get pulled into the custom homepage transformation that we have, so we had to develop something custom to implement it.

We thought that A/B nodes with children would automatically have the parent page hidden from navigation, but that wasn't the case with this transformation. Also, it seems like the stock A/B testing never really worked anyway. We turned it on and it didn't seem to do anything. I followed the instructions in your manual and it wasn't working. The business still wants to do A/B testing so I had to write some custom code to do it.

The way that I'm doing it now is by setting a custom A/B cookie when the user hits the root navigation menu and then our custom A/B uses the custom A/B cookie to display one page or another in the homepage nav transformation.

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on November 6, 2020 17:08 (last edited on November 6, 2020 17:09)

Ok, makes more sense now. So I think it's the way you've built/structured navigation then is causing issues, not A/B testing. Then it might be worth fixing navigation to support A/B testing rather than developing your own A/B testing?

I still don't understand what are you trying to A/B test? If you can provide more details it would be easier to help you. Basically, what variant A means to you, what variant B and what is the conversion you are measuring to understand the winner?

Something like this. Easy case (A/B test just one page):

  • Variant A: display default hero banner on the homepage featuring generic most popular product
  • Variant B: display personalized hero banner on the homepage featuring most popular product in specific country and personalized by country
  • Conversion: purchase completed
  • Thesis to test: creating country-personalized hero banner gives higher conversion rate into purchases

More complicated case (A/B test journeys of multiple pages):

  • Variant A: checkout wizard containing multiple steps (pages) with small forms A, B, C, D
  • Variant B: checkout wizard containing one large form (page) E
  • Conversion: purchase completed
  • Thesis to test: multiple smaller forms give you better conversion compared to one long form

And so on. Both scenarios are very much doable, I implemented those personally. Stock A/B testing works, it must be something wrong with your setup. For instance, it requires Visitor cookies enabled. If you disable cookies - A/B testing will not work.

0 votesVote for this answer Mark as a Correct answer

kentico guy answered on November 6, 2020 17:49 (last edited on November 6, 2020 17:50)

Thanks for the advice. I'm thinking you've pretty much answered my question. The route that I'm probably gunna need to go is url mask anything after the final / and then clone the A/B testing page type. If the A/B testing page type has children then do a redirect based on the random A or B cookie.

When I say that the A/B testing wasn't working what I mean is that if I create an A/B test page type with two children then I turn on the A/B test with 100% conversion rate; if I click on the parent page it always takes me to the parent page. It never redirects to either of the children.

I actually tried doing this before I did anything with the custom transformation. On it's own the A/B Test never did any type of redirection. I followed the directions so maybe it's some type of interference with our custom code.

I appreciate you taking the time. Also sorry I assumed that you were one of the kentico team. I misread your title. Have a great day sir =]

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.