Created
February 20, 2021 21:23
-
-
Save sahava/b8095be749550c72d4c9debea83b4096 to your computer and use it in GitHub Desktop.
Sample Server container policy file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gtag('policy', 'all', function(container, policy, data) { | |
switch (policy) { | |
// Only allow _ga cookie to be set. | |
case 'set_cookies': | |
return data.name === '_ga'; | |
// All other permission requests are allowed. | |
case 'access_response': | |
case 'access_template_storage': | |
case 'get_cookies': | |
case 'logging': | |
case 'use_message': | |
case 'read_container_data': | |
case 'read_event_data': | |
case 'read_event_metadata': | |
case 'read_request': | |
case 'return_response': | |
case 'run_container': | |
case 'send_http': | |
default: | |
return true; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment