Best practices: Test CMP web implementation

Your organization will probably want to load and reload your messages multiple times while testing your CMP web implementation. In this article, we've compiled some tips and tricks that you can leverage while testing your CMP implementation.


Reload CMP messaging experience in same browser

Once you have loaded and interacted with your messages on your test web property, your consent record is stored to the consentUUID cookie. Subsequent refreshes/reloads of the test web property from this browser will read the existing consentUUID cookie and a message will generally not reappear unless specified in your scenario.

 Definitions

consentUUID: Represents the users unique id for which a consent record is stored against

A simple way to reload your CMP messaging experience in the same browser is to remove the consentUUID cookie from your browser. 

Screen_Shot_2022-09-09_at_2_50_23_PM.jpg

Reload your browser after the consentUUID cookie is removed. Sourcepoint's messaging service will not detect the consentUUID and reload your messaging experience. 


Manually change partition set 

A partition set allows your organization to divide end-users who visit a property into one or more distinct partitions (groupings) who can receive different messaging scenarios. While testing your web property, you can manually force the assignment of a particular partition to your visit to view the messaging experience.

Sourcepoint uses a randomly generated number between 0-999 which correlates to the percentage configured for each partition within the set. See example below for more details: 

 Example

Your organization has configured an A/B test for two messaging scenarios and want half of the end-users visiting your property to receive scenario A and the other half to receive scenario B.

Screen_Shot_2022-09-12_at_9.11.43_AM.png 

In descending order, Sourcepoint will assign the numbers between 0-999 to each partition based on the percentage configured for that partition. In our example, 50% of the numbers will be assigned to A group and 50% of the numbers will be assigned to B group.

Partition Name Percentage Configured Numbers Assigned
A group 50% 0-499
B group 50% 500-999

To manually change the partition set, load your web property but do not interact with the message. 

Open the developer console in your browser and select the Applications tab.

Screen_Shot_2022-09-12_at_9.58.48_AM.png

Expand the Local Storage accordion and locate the _sp_local_state key.

The second number in the value after _sp_v1_uid corresponds to the randomly generated number for the partition. 

Screen_Shot_2022-09-12_at_10_18_50_AM.jpg

Edit the second number in the value to a number that corresponds to the partition you wish to view. 

Reload the page when finished.

Screen_Shot_2022-09-12_at_10_23_12_AM.jpg

The partition that corresponds to the edit number used should load on your web property.


Test campaign in Stage environment (web)

Campaign(s) added to the stage environment allow you to preview and test your message experience (strategy, layout, copy, etc.) on the property without it being visible to your end-users.

In order to test a campaign running in the Stage environment for a web property you will need to append the following query string parameter to the URL: ?_sp_env=stage

Below is an example of a URL that would surface the Stage campaign for the web property

https://examplesite.com?_sp_env=stage

Was this article helpful?
0 out of 0 found this helpful