Expand my Community achievements bar.

SOLVED

Can DTM concatenate and/or minify scripts?

Avatar

Level 1

Currently, if I have a rule with 3 third party scripts, DTM will load each script individually onto the page with separate requests. Is there a way to tell DTM to combine them?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Chris / Todd,

It basically depends on the Type of Javascript / Third party tags you wish to combine.Please find below some points on the same.

1. Its not possible to combine Javascript / Third party tags from different vendors i.e. Fire a single image request for both the vendors.

2. For combining Javascript / Thirdparty tags from same vendor , you need to contact your vendor to device the mechanism for combining multiple tags.

3. For Adobe Analytics, Do not write a separate call s.t() for each Javascript code , Page load rule condition i.e. Top of the page , bottom of the page etc. will itself take care of that.

Please let us know if you have any further queries for the same.

Thanks & Regards 

Parit Mittal

View solution in original post

4 Replies

Avatar

Employee

Chris,

It depends on the types of scripts.  Which ones are you trying to combine?

-Rudi

Avatar

Level 1

I am also wanting to know this.  I have a Page Load Rule that has 5 separate "Javascript / Third Party Tags".  They are all Sequential Javascript scripts.  When I check the network calls in Chrome, I see a separate satellite-[guid].js call for each.  Any way those could all be combined / minified into a single call?  I thought maybe it was just a staging thing, but I checked the live site and they are separate calls there as well.

Avatar

Correct answer by
Level 10

Hi Chris / Todd,

It basically depends on the Type of Javascript / Third party tags you wish to combine.Please find below some points on the same.

1. Its not possible to combine Javascript / Third party tags from different vendors i.e. Fire a single image request for both the vendors.

2. For combining Javascript / Thirdparty tags from same vendor , you need to contact your vendor to device the mechanism for combining multiple tags.

3. For Adobe Analytics, Do not write a separate call s.t() for each Javascript code , Page load rule condition i.e. Top of the page , bottom of the page etc. will itself take care of that.

Please let us know if you have any further queries for the same.

Thanks & Regards 

Parit Mittal

Avatar

Level 1

ParitMittal wrote...

Hi Chris / Todd,

It basically depends on the Type of Javascript / Third party tags you wish to combine.Please find below some points on the same.

1. Its not possible to combine Javascript / Third party tags from different vendors i.e. Fire a single image request for both the vendors.

2. For combining Javascript / Thirdparty tags from same vendor , you need to contact your vendor to device the mechanism for combining multiple tags.

3. For Adobe Analytics, Do not write a separate call s.t() for each Javascript code , Page load rule condition i.e. Top of the page , bottom of the page etc. will itself take care of that.

Please let us know if you have any further queries for the same.

Thanks & Regards 

Parit Mittal

 

Parit, so I have a Page Load Rule that is not tied to anything except code.  See shot here: http://screencast.com/t/WdYDsFIheTnv  It is not associated to Analytics or anything else. Also, it triggers at Bottom of Page: http://screencast.com/t/TFT6bgc23

Inside that rule, I only have custom scripts created.  You can see them here: http://screencast.com/t/bngD0lVA  They are just general javascript that use _satellite.  Nothing complicated.

Finally, in the webpage networking on chrome, I see them all getting included separately.  http://screencast.com/t/LPU1lfQgZq

Now, you can see from my Page Load Rule, that I like to have all my scripts named as that makes maintenance a ton easier than trying to find something in one huge js script file.  However, I can't have hundreds of separate files included at run-time...