New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special Characters #1

cefn opened this Issue Jan 23, 2019 · 1 comment


None yet
1 participant
Copy link

cefn commented Jan 23, 2019

Hi there. Thanks for your work on the viewability plugin!

In your readme you mention "Please don't use any special characters"

Can you indicate what counts as a special characters in a field value marshalled into impressions and clicks and sent for dispatch as a hit URL via ATInternet.Tracker.Tag?

My hypothesis: the use of the javascript function encodeURIComponent would neutralise any issues with any string given the URL marshalling scheme is fields separated by hyphens, surrounded by square brackets,

Is this reasonable?

Alternatively, are there any exceptions to this rule, e.g. characters which would make it through an encodeURIComponent but which would choke as a value in an ATI field.

Here is a representative example of the URLs I'm talking about, based on a hit notification I saw elsewhere...[responsive]&x3=[my_website]&x4=[en]&x5=[]&x8=[value-0.3.1]&x9=[Cefn_-_Home]&ref=


This comment has been minimized.

Copy link

cefn commented Jan 29, 2019

As a workaround I am using an RFC3986 URI encoder (more aggressive than javascript's built-in encodeURIComponent). See fixedEncodeURIComponent reference implementation in

A still more aggressive encoder is provided by...

function cefnEncodeURIComponent(str) {
  return str.replace(/[^a-zA-Z0-9]/g, function(c) {
    return '%' + c.charCodeAt(0).toString(16);

Which I have found to be effective at marshalling arbitrary strings so they are viewable in the ATI Explorer. In particular, this encodes Tildes ~ which may have a special significance in the ATI infrastructure.

@cefn cefn closed this Jan 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment