Permission: Campaign entities

Sourcepoint's tracking systems can match the website to the property name in your organization's campaign in a few ways. If your organization wishes to use regex commands as part of your targeting in scenario setups this article can help you.


Matching a website to a property name

Sourcepoint's CMP script implemented on your organization's webpage uses the document.location.href javascript command to retrieve the url of the website. It passes this information to our servers where a lookup against a property name is performed to determine whether there is an active campaign.

For this reason it is advantageous to choose property names that match your website url e.g. 'www.football24.com', 'www.allsports24.com'.

Use of wildcards in property names

Sourcepoint supports the use of wildcards in property names for example, '*.sportsaction.com'.

Websites like 'football.sportsaction.com' and 'basketball.sportsaction.com' can be supported with a single property name '*.sportsaction.com'. Therefore two or more websites can be supported by the same scenario under one property.

Optional

An explicit link to a campaign's property name can be established through the CMP stub code implemented on your organization's webpage. This can be done by adding the propertyHref parameter to the configuration part and setting its value to the property name in your Sourcepoint campaign.

Please remember that the term 'https://' must precede the full property name in the propertyHref value.

<script>
   function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(){for(var t,e,o=[],n=window,r=n;r;){try{if(r.frames.__tcfapiLocator){t=r;break}}catch(t){}if(r===n.top)break;r=n.parent}t||(function t(){var e=n.document,o=!!n.frames.__tcfapiLocator;if(!o)if(e.body){var r=e.createElement("iframe");r.style.cssText="display:none",r.name="__tcfapiLocator",e.body.appendChild(r)}else setTimeout(t,5);return!o}(),n.__tcfapi=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return o;"setGdprApplies"===n[0]?n.length>3&&2===parseInt(n[1],10)&&"boolean"==typeof n[3]&&(e=n[3],"function"==typeof n[2]&&n[2]("set",!0)):"ping"===n[0]?"function"==typeof n[2]&&n[2]({gdprApplies:e,cmpLoaded:!1,cmpStatus:"stub"}):o.push(n)},n.addEventListener("message",(function(t){var e="string"==typeof t.data,o={};if(e)try{o=JSON.parse(t.data)}catch(t){}else o=t.data;var n="object"===_typeof(o)?o.__tcfapiCall:null;n&&window.__tcfapi(n.command,n.version,(function(o,r){var a={__tcfapiReturn:{returnValue:o,success:r,callId:n.callId}};t&&t.source&&t.source.postMessage&&t.source.postMessage(e?JSON.stringify(a):a,"*")}),n.parameter)}),!1))}();
</script>
<script>
   window._sp_ = {
      config: {
         accountId: 7777,
         baseEndpoint: 'https://cdn.privacy-mgmt.com',
         propertyHref: 'https://football.sportsaction.com' 
      }
   }
</script>
<script src="https://cdn.privacy-mgmt.com/wrapperMessagingWithoutDetection.js"></script>

An explicit link can also be established by adding the propertyId parameter to the configuration code and setting its value to the property id in your Sourcepoint campaign.

  Note: If you intend to use propertyHref or propertyId please remember that these take precedent over your website domain, the Sourcepoint CMP will act using these settings. Please ensure that you set the correct values.

If using propertyHref in your configuration script, Sourcepoint strongly encourages your organization to add joinHref: true to your configuration script as well to ensure that all directory regular expression functionality works as intended. 

Using propertyHref or propertyId could help when testing implementations on pre-production websites prior to actual launch. More information on these parameters can be found here.


Page url targeting gate

  Your account will require:

• Admin access or Domain access to property or property group
Feature access to message/scenario partition set management

The page URL targeting condition allows your organization to specify with more control when a message should appear based on the URL address of specific pages.

From a new or existing step in a scenario, click Add condition.

add_condition_2.png

Use the Conditions dropdown menu to select Page URL Match.

Screen_Shot_2021-08-04_at_11.53.30_AM.png

In the Page URL Match panel, select whether you want to use the condition to include or exclude webpages that contain certain words in the URL.

include_exclude_2.png

Input the word, phrase, etc. that will be included or excluded as part of the targeting condition and where in the URL the word, phrase, etc... can be found.

In the example below, we do not want the first layer message displayed on webpages that contain privacy-policy and data-compliance at the end of the URL.

  Note: Please remember to enter the page names using a regex format, in this example .*privacy-policy.* and .*data-compliance.*.

More information on this can be found here.

Click the + symbol when finished to add your configuration to the condition. Additional page URL targeting can also be applied to the condition (e.g. including webpages with certain keywords and excluding webpages with certain keywords).

Click Add then Update to finish.

Screen_Recording_2022-01-27_at_16.18.33.gif


Examples - page url targeting with regex

A regular expression (shortened as regex) is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation.

We provide two examples how regex can be used with the Page Url Match gate.

Display a message for domain

Your organization wants to display messages for the main domain, subdomains and subdirectories belonging to mydomain.com.

To display the message the Page URL Match should be set to 'Include' and the match condition set to 'contains'. The regex argument should be set to .*mydomain.com.*.

include_regex_domain.png

Exclude a message for specific page

Your organization can exclude messages for a specific page, for example a privacy policy page at https://finance.mydomain.com/privacy-policy where your organization does not need the message to be shown.

To prevent the message being shown the Page URL Match should be set to 'Exclude' and the match condition set to 'Ends with'. The regex argument should be set to .*privacy-policy.*.

exclude_regex_privacy.png

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