Mobile adblock messaging
To detect most mobile adblockers, Sourcepoint needs to enable network detection. This is because most mobile adblockers do not use element hiding for their adblock tactics. If the flag below is added to the Sourcepoint configuration code dynamically for mobile devices then Sourcepoint can properly detect and message mobile devices.
Please note, it is best practice that network detection not be used for desktop. Using network detection on desktop can lead to a large number of false-positive results for users and is a potentially negative user experience for this audience. Therefore, it is critical that this flag is only present or set to true on mobile devices.

Mobile Specific Flags

1
window._sp_.config.use_network_detection = true;
Copied!
In the example configuration below, the additional code is highlighted in yellow.

Example Mobile Configuration

1
<script type = "text/javascript">
2
( function () {
3
// { PUT SP BOOTSTRAP CODE HERE INLINE }// standard configuration parameters for sourcepoint
4
window._sp_ = window._sp_ || {};
5
window._sp_.config = window._sp_.config || {};
6
window._sp_.config.account_id = YOUR_ACCOUNT_ID;
7
window._sp_.config.content_control_callback = function () { } ;// replace with your messaging domain
8
window._sp_.config.mms_domain = 'message.sp-prod.net' ; // messaging-specific configuration
9
window._sp_.mms = window._sp_.mms || {};
10
window._sp_.mms.cmd = window._sp_.mms.cmd || [];//optional flags for Mobile customers
11
window._sp_.config.use_network_detection = true;window._sp_.config.mms_client_data_callback = function (o) {
12
console.log("data callback json: " + o);
13
};window._sp_.config.mms_choice_selected_callback = function (choiceID) {
14
console.log( "Choice : id=" + choiceID);
15
} ; // example usage of setting a targeting parameter
16
window._sp_.mms.cmd.push( function () {
17
window._sp_.mms.setTargeting( "color_preference" , "blue" );
18
});// tell the messaging library that all params are set
19
//and it can proceed window._sp_.mms.cmd.push( function () {
20
window ._sp_.mms.startMsg();
21
});// use the sourcepoint bootstrap code (inlined above) to load
22
// the main messaging library
23
window._sp_.bootstrap( 'messaging-2.0.980.js' ); })();
24
</script>
Copied!
Last modified 2yr ago