Adobe Launch synchronously and self-hosting best practices for possible file loading issues

Avatar

Avatar

Antti_Ko

Avatar

Antti_Ko

Antti_Ko

27-10-2019

Pretty simple stuff, just want to be 110% sure and understand are there any best practices or caveats around these issues.

1. When Launch is deployed synchronously, there are two embed codes, one which you put in the <head> and another which you put before the </body>.

Let's say we are self-hosting the script through another domain/cloud (if this matters in any way)

a) What happens in browser if the Launch script in header is not available. So url doesn't exists. I guess you could ask this question regarding any .js file. Maybe you get error message in console that url X is not available or gives 404. But this shouldn't have any effect to user browsing the site, right?

b) what happens (to browser) at the bottom of the page when satellite.pageBottom is trying to call/load. Again, nothing too serious for the end-user, maybe just some kind of notification in console or?

c) Would it be best practice to add try catch for that, e.g.   <script type="text/javascript">try {_satellite.pageBottom();}catch(e){}</script> 

d) What if script is available in header, but it contains javascript errors and file can't be read by browser (at least to the end). Could this result the whole page not to load or to have massive errors for the end-user? I guess this depends on the error, because with javascript you can do anything to the site, but let's imagine that browser can't fully read the file. Of course Adobe Analytics hit wouldn't be send, but other possible issues for the end-user?

2. If we host Launch files ourselves in some cloud services (AWS for example) we can give cache-control headers to these files directly in AWS and this way Adobe's own cache settings won't have any effects, because files are not hosted through Adobe's default (akamai) cloud service, right? If we choose in AWS not have any cache-controls then all the files would be loaded fully every time page is loaded and there wouldn't be any cache, right?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

andrewb90126324

Avatar

andrewb90126324

andrewb90126324

03-02-2020

1a: The script will 404.  Anything you have in Launch won't load.  It shouldn't affect the user browsing the site unless you have some code in Launch which is required.

1b: You should check for the existence of _satellite before calling _satellite.pageBottom()

1c:  Example <script>if (typeof _satellite !== "undefined"){_satellite.pageBottom()}</script>

1d: This should only cause issues with the code in the Launch script running, not with the entire page

2: If you self host you can set your own cache control and it will not use Adobe's (since they aren't hosting it.)  Not sure what happens in AWS if you don't set anything.

Answers (0)