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

window._sp_.config.use_network_detection = true;

In the example configuration below, the additional code is highlighted in yellow.

Example Mobile Configuration

<script type = "text/javascript">
( function () {
// { PUT SP BOOTSTRAP CODE HERE INLINE }// standard configuration parameters for sourcepoint
window._sp_ = window._sp_ || {};
window._sp_.config = window._sp_.config || {};
window._sp_.config.account_id = YOUR_ACCOUNT_ID;
window._sp_.config.content_control_callback = function () { } ;// replace with your messaging domain
window._sp_.config.mms_domain = '' ; // messaging-specific configuration
window._sp_.mms = window._sp_.mms || {};
window._sp_.mms.cmd = window._sp_.mms.cmd || [];//optional flags for Mobile customers
window._sp_.config.use_network_detection = true;window._sp_.config.mms_client_data_callback = function (o) {
console.log("data callback json: " + o);
};window._sp_.config.mms_choice_selected_callback = function (choiceID) {
console.log( "Choice : id=" + choiceID);
} ; // example usage of setting a targeting parameter
window._sp_.mms.cmd.push( function () {
window._sp_.mms.setTargeting( "color_preference" , "blue" );
});// tell the messaging library that all params are set
//and it can proceed window._sp_.mms.cmd.push( function () {
window ._sp_.mms.startMsg();
});// use the sourcepoint bootstrap code (inlined above) to load
// the main messaging library
window._sp_.bootstrap( 'messaging-2.0.980.js' ); })();