Location Services

How to geolocate users with Cookie Consent

Architecture

Cookie Consent contains three modules named Popup, Law and Location.

  • Popup can be used on it’s own regardless of it’s location, and contains any and all functionality for displaying a popup on screen.
  • Law accepts the popup options and a country code. Using the country code it modifies the popup options, enabling/disabling certain functionality in order to comply with the law specified by that country
  • Location is simply a tool for getting the two letter country code that the user is in.

Together, these modules: get the country code, apply the law specific to that country, and display the popup (if necessary)

In code form, a service looks like this:

{ url: <string> //The location of the service API isScript: <boolean>, //Whether to use a script tag or a XMLHttpRequest data: <object>, //Useful if the service requires post data headers: <array>, //Useful for setting service specific header callback: <function(done, response)>, //A handler for understanding the response }

The callback provides a done callback. If you need to make additional requests, call done with the country code when you’re finished. Otherwise, just return the country code

Example:
{ url: '//example-service/script.js', isScript: true, callback: function (done, response) { // We just downloaded the 'script.js' which defined a third party object. if (!window.MyService) { done(new Error('The JavaScript file failed to download and define MyService')); } MyService.locateMe(function(response){ done({code: response.countryCode}); }, function(err){ done(new Error(err)); }); }, }

Services

In order to find the location, Cookie Consent uses third-party location services. These third-party services usually provide an API that can be accessed over the internet.

To integrate a new service, you need to define the service location, the type of request (XMLHttpRequest vs <script>) and how the tool should interpret the response.

To do this, define a new service like so:

cookieconsent.initialise({ ...popupOptions, location: { serviceDefinitions: { mynewservice: function(options) { return { url: '//example-service.com/json', callback: function(done, response) { // This function must parse the 'response' and return the country code, or fail. // If this function doesn't fail correctly, then the next service will not run. // Therefore, it's generally best to add a <em>try {...} catch () {...}</em> block try { var json = JSON.parse(response); if (json.countryCode) { return {code: json.countryCode} } throw 'Could not find a country code in the response'; } catch (err) { return new Error('Invalid response (' + err + ')'); } }, }; }, }, services: [ 'mynewservice' ] } });

Above, you can see that we first define our service, then we use it by adding it to the services array. We can add it simply by passing the name of it as a string.
Some service definitions may be more complicated though, and require configuration.

To do this, you can pass an object instead:
services: [ { name:'mynewservice', mySpecialOption: 'some value', KEY: 'uUCGtoyeiH5gsm3Wn2cp9D1Z1deHcpBG8ySA4hYBcQd20Z4C6AwGKqln7mtEfGN' } ]

Then, when defining your service, the options are passed through like so:

mynewservice: function(options) { // `options.mySpecialValue` and `options.KEY` now exist return { url: '//someurl.com?apiKey='+options.KEY // ...serviceDefinition }; }

As well as passing an object with options into the ‘services’ array, you can also pass a function that returns an object, just because.

Notes

Above, we integrated options.KEY with the url by simply appending the two string. If you’re lazy, there is an option called interpolateUrl which will automatically interpolate a string with the values of an object. Use it like so:

serviceDefinitions: { mynewservice: function(options) { return { url: '//example-service.com/json?key={api_key}&someValue=1&callback={callback}', isScript: true, // use this flag to tell the tool to download // the resource as a script tag (using JSONP) callback: function(done, response) { // handle response }, }; }, }, services: [ { name: 'mynewservice', interpolateUrl: { api_key: 'uUCGtoyeiH5gsm3Wn2cp9D1Z1deHcpBG8ySA4hYBcQd20Z4C6AwGKqln7mtEfGN' } } ]

The {callback} string can be used in the URL to automatically write the JSONP callback. It is appended with Date.now() to prevent global namespace collisions.

What's New at Osano

Osano partners with SecurityScorecard

Osano has partnered with Security Scorecard, joining its 360° Marketplace launch, enabling customers to amplify their privacy and compliance programs with cybersecurity data. 

Release 2021.6

This release includes language-translation updates to Russian, Chinese Hong Kong (zh-hk) and Chinese Taiwan (zh-tw). 

In addition, this release features enhancements to the Consent Manager experience for users with a right-to-left language.

Release 2021.2.3

This release includes language-translation updates to German, Romanian, Italian, Chinese Hong Kong (zh-hk) and Chinese Taiwan (zh-tw). 

Learn More

Consent Manager now available in 42 languages

Consent Manager has been updated to support auto-translations in Lithuanian, Latvian and Brazilian Portuguese.

We have also enhanced support for right-to-left languages. 

See a full list of supported languages here.

Griswold release

This release features improvements to Osano Consent Management features and search engine optimization metrics. Customers can now choose to turn First-Layer Categories on/off in cookie banners. Also, customers have the ability to toggle Legacy Browser support on/off to improve site performance. 

 

Consent Manager now available in 39 languages

Consent Manager has been updated to support auto-translations in Croatian and Icelandic. See a full list of supported languages here

Vendor Auto-Following

Enterprise customers can now automatically track the vendors they've identified in Consent Manager. The change allows seamless and constant monitoring of your vendors and eliminates the need to follow them manually. The feature also alerts you to relevant policy changes their vendors have made and changes that could impact your risk.

Pentland release

This release offers new features in consent management and data subject access requests products. This release is named after Alex Pentland, one of the architects of the GDPR.

Pentland Release Notes

Privacy consulting

Osano is now offering privacy consulting in addition to our compliance software. Whether you need an interim privacy officer, a data protection officer or project-specific resources, our privacy consultants are ready to roll their sleeves up for you.

Explore Consulting

Sweeney release

We have just released a major new upgrade to our platform. This update features role-based access controls for your business. Admins will now be empowered to restrict a user's access and control to specific parts of Osano's platform. This release is named after Latanya Sweeney a Harvard privacy researcher and advocate.

Sweeney Release Notes

Westin release

This update includes improvements and enhancements to consent management. This release is named in honor of Alan Westin, the father of modern data privacy law.

Westin Release Notes

White paper: The Osano Data Privacy and Data Breach Link

Announcing a groundbreaking report analyzing the relationship between a company’s privacy practices and their likelihood of experiencing a data breach. The Osano Data Privacy and Data Breach Link reveals a predictive relationship between responsible privacy practices and security outcomes.

Download the White Paper

11,000 vendors and counting!

Osano's proprietary dataset of vendor privacy risk just broke 11,000! We couldn't be more proud! 🎉

Brandeis release

Announcing a massive update to Osano's platform! We completely re-built the consent manager from the ground up. Updates include:
  • Automated script and cookie classifications
  • We've added multi-factor authentication to help further safeguard your Osano account
  • More than a dozen other features, enhancements, and bug fixes

This release is named after Louis Brandeis, one of the original pioneers of data privacy rights. We released an article on our blog about his fascinating life and how it impacted the data privacy world.

Read the Release Notes

Privacy Insider newsletter

Check out Osano's Privacy Insider newsletter! Every Tuesday, Osano sends a synopsis of the week's most interesting news in the world of data privacy.

A lot of change is happening fast. We take the work out of keeping abreast of regulatory and technological developments.

Subscribe

Release 2020.4

April's release features major improvements to our data subject access request (DSAR) forms:

  • Added a forms editor for customization and 
  • Added pre-fillable forms to save you time
  • Added data elements for commonly used fields

This release included a bunch of other enhancements and features.

Read the Release Notes

Osano launches a partnership with Exterro

Osano and Exterro launched a partnership this week to pair Osano’s industry-leading cookie consent management and vendor monitoring with Exterro’s powerful suite of privacy, e-discovery and risk management tools.

Learn More

Covid-19 Update

How will Covid-19 impact Osano? Read a note from our CEO.

Read the Note

Release 2020.3

Minor bug fixes and the ability to more easily manage your own account billing.

Read the Release Notes

Release 2020.2

Engineering has been hard at work adding new features and 🐜🐛🐞 fixing.

· CCPA Opt-Out mode
· CCPA Do-Not-Sell toggle
· IAB framework implementation
Read the Release Notes

New Year - New Consents!

With today's release, Osano customers now have access to:

· Automated real-time scanning of 1st party cookies.
· Automated scheduled deep site scanning
· Embedded 3rd party disclosures.
· Searchable blockchain-based audit log of consents.
Learn about Consent Management

Application Release 2019.5

Osano regularly releases updates. This December update includes new features to help expedite CCPA compliance.

See the full changelog

Application Release 2019.3

Osano regularly releases updates. This November update includes bug fixes, customer feature requests, and improved consent visualizations.

See the full changelog

Application Release 2019.2

Osano regularly releases updates. This October update improves notifications, addresses numerous user interface bugs, and refreshes the entire application.

See the full changelog

Osano Launch

Osano's open-source tools currently help more than 750,000 active websites with their compliance. These numbers make Osano the most pervasive privacy product on the planet. After more than a year of development and testing, you can finally access the Osano suite of applications. We're honored to launch Osano on stage at TechCrunch Disrupt Battlefield.

Watch The Video

7,000 Vendor Milestone

The Osano attorneys have been hard at work and today we are proud to share that we have now evaluated the privacy practices of more than 7,000 companies!

Learn about vendor monitoring

Beta Testing Complete

Thank you to all of the beta testers who participated in the closed beta. The beta has now concluded as we prepare for launch.

Osano Closes $5.4M Series A

Explosive growth and ease of use are a few of the reasons that investors are falling in love with Osano.

Read about our Series A

Osano offers new features on consent management and data subject access controls

Explosive growth and ease of use are a few of the reasons that investors are falling in love with Osano.

Read about our Series A

Osano Closes $5.4M Series A

Explosive growth and ease of use are a few of the reasons that investors are falling in love with Osano.

Read about our Series A