hasSection

The hasSection command is used to detect whether your implementation has generated a specific section. Click here to view the hasSection command in the GPP specification.

By default, Sourcepoint will set the respective U.S. State privacy section for each of the following U.S. states that are added to the framework territories of a property's vendor list: California, Colorado, Connecticut, Utah, and Virginia. The U.S. National Privacy section will be set for all other U.S. states added to the framework territories of a property's vendor list.

Command

🚧

U.S. National Privacy Section

Please note there is currently a discrepancy between the documented client side API prefix for all sections in the GPP specification and how it is implemented via the GPP stub file. In order to ensure your commands execute successfully, the articles in this section will utilize the API prefixes as it is implemented via the GPP stub file until the discrepancy is remedied.

__gpp('hasSection', (data,success)=>{console.log("Specified section detected: " + success)}, 'usnatv1');
function hasSection_fn(data, success) {
  console.log("Specified section detected: " + success);
}

...

__gpp('hasSection', hasSection_fn, 'usnatv1')

Response

In addition to any custom code you might implement when your function executes, the command will return true for the success parameter if your implementation has the specified section.