Home App Docs Blog Github

A/B testing: I'm using HTML API always display Default and not the variants

I’m using HTML API to fetch the HTML content and bind it to an angular component in my webpage.

I’m trying out A/B testing features. I have Default, Variant 1, Variant 2 and Variant 3 set. In HTML API response json I see the variant mark ups in html, but it always load the Default HTML content and not other variants.

HTML API Request: https://cdn.builder.io/api/v1/html/page?apiKey=a843ae8443ff41839648a36c92766089&url=http%3A%2F%2Flocalhost%3A4200%2Fanon

I’m actively looking for the best website builder. So any help is highly appreciated. Thanks.

UPDATE: Just noticed it’s working in Edge(displays the variants too) and not in chrome (I have ‘allow all cookies’ enabled). Surprised that chrome didn’t display any variants. Any reason why it’s happening?

Also, HeatMap is not displaying any data. Just says ‘You have no metrics yet’. Will be very helpful to decide on builder.io if we get this working. Thank you.

html api request : https://cdn.builder.io/api/v1/html/page?apiKey=a843ae8443ff41839648a36c92766089&url=http%3A%2F%2Flocalhost%3A4200%a-b-tests

Hi @KannanM , a/b variations (including default variation) once elected on user’s browser it’ll stick until cookie is cleared, so if you’re testing and got locked to the default variation then you’ll only see that, you can get around it by deleting the test cookie in dev tools, it should be named builder.test.[entry's id] , this will reset the test to elect a new variation on next load.

For the content you shared above, I can see the variations election is working fine fore me.

Hi @aziz , Thanks for your input.

Any idea why the heatmap is not working?

@KannanM Identified an issue with the UI that disables viewing heatmaps in some cases where the impressions stats are low on the default variation, I’m sorry you ran into this bug, we have a fix coming next release ( scheduled for tomorrow )

1 Like

Thanks @aziz . Please let me know once the fix is out. I will check it out. Thank you.

@KannanM Fix is deployed, you should be able to view heatmaps now

Awesome, Thanks mate, it’s working. Excited to see it work.

1 Like