Expand my Community achievements bar.

SOLVED

Extract URLs over 255 characters with Report Builder

Avatar

Level 2

Hello all,

 

I have a list of URLs and some of them exceed 255 characters. I've noticed that these URLs are truncated in Adobe Analytics and I lose some important data when I extract my report using Report Builder.

 

Is there a way to extract the full URL (including those that have more than 255 characters) using Report Builder (I tried to see how it looks with the Global Page Name, but I need some details from the URL, like the country/language)?

Is there any other dimension that I can use and that has the full URL?

Or is there any other option?

Thank you!

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

I've not done this myself, but it would basically be custom code.

 

// custom code for URL (main)
var url = _satellite.getVar('URL');
if (url.length > 255){
    url = url.substring(0,255);
}
return url;




// custom code for URL part 2 (over 255)
var url = _satellite.getVar('URL');
var urlpart2 = "";
if (url.length > 255){
    urlpart2 = url.substring(255,510);
}
return urlpart2;





// custom code for URL part 3 (over 510)
var url = _satellite.getVar('URL');
var urlpart3 = "";
if (url.length > 510){
    urlpart3 = url.substring(510);
}
return urlpart3;

Note: if your URL is greater than 765 characters, then you will still have truncation

 

Each block of code above would have to be it's own custom code Data Element:

Jennifer_Dungan_0-1721425036626.png

 

 

Then you would have to set your part 1, 2 and 3 eVars to the specific data elements that process the URL into parts.

View solution in original post

6 Replies

Avatar

Community Advisor and Adobe Champion

So, from what I understand, the "deep" URL tracking in Adobe (the one you can only access with Raw Data feeds) will split the URL into multiple parts if it exceeds the character limit.

 

The custom dimensions we have access to, the max character count is 255...  but in theory, you could try setting up "URL" and "URL (part 2)", and even "URL (part 3)" if your URLs are super long...

 

So if your URL is under 255 characters, just pass into URL.

If it's over, pass the first 255 into URL, then take the remainder and pass into URL (part 2)

If you need to potentially do a 3 part dimension, then you would apply the same logic to the "part 2" as you did on the main, checking for character count over 255 and splitting.

 

Now, using in Report Builder can be a bit tricky.. yes, you can add additional dimension columns... but in my experience, it loses the reference when you edit the request.. so it's something you have to be mindful of, but I am sure with some tweaking you should be able to make something work?

 

I would try to use a QA or Dev suite first, pass in a few pieces of sample data and make sure you can get it working before implementing a full solution.

Avatar

Level 2

@Jennifer_Dungan I dont’t think I understand. How to create the URL (part 2) if it exceeds 255 characters? Do you have an example or screen shot?

Avatar

Correct answer by
Community Advisor and Adobe Champion

I've not done this myself, but it would basically be custom code.

 

// custom code for URL (main)
var url = _satellite.getVar('URL');
if (url.length > 255){
    url = url.substring(0,255);
}
return url;




// custom code for URL part 2 (over 255)
var url = _satellite.getVar('URL');
var urlpart2 = "";
if (url.length > 255){
    urlpart2 = url.substring(255,510);
}
return urlpart2;





// custom code for URL part 3 (over 510)
var url = _satellite.getVar('URL');
var urlpart3 = "";
if (url.length > 510){
    urlpart3 = url.substring(510);
}
return urlpart3;

Note: if your URL is greater than 765 characters, then you will still have truncation

 

Each block of code above would have to be it's own custom code Data Element:

Jennifer_Dungan_0-1721425036626.png

 

 

Then you would have to set your part 1, 2 and 3 eVars to the specific data elements that process the URL into parts.

Avatar

Community Advisor and Adobe Champion

I should add, there may be an extension that does substring functionality... since this is basic JS for me, I would just code it myself rather than adding a whole extension for it... 

Avatar

Level 2

@Jennifer_Dungan Ok, I understand. In order to implement this code, I assume I would need admin rights, correct? This looks very unfamiliar to me. 

Avatar

Community Advisor and Adobe Champion

You would need admin rights to set up the new eVars, and rights to deploy code in Launch (which doesn't necessarily mean "admin", but certainly elevated rights).

 

You may have to log a request to your admin and implementation teams to do, if this isn't a part of your day to day job.