Switch from remote to locally hosted JS

To change from remote to locally hosted JS you will need to go to App Settings > SDK Integration. On this page you should see something like this: 

 

Screen_Shot_2017-05-02_at_17.02.05.png

 

To switch from remote to locally hosted JS follow the following steps:

  1. If the location where you intend to keep manifest.json and service-worker.js does not match those shown on this page enter the correct relative/absolute urls in field provided and click save.
  2. Download your SDK and service-worker JS from the following locations:
    1. https://prod.webpu.sh/YOURAPPLICATIONKEY/sdk.js
    2. https://prod.webpu.sh/YOURAPPLICATIONKEY/service-worker-source.js
  3. Place these files in the appropriate location in your website directory
  4. In the JS integration code placed on your on your site update the param in the code that points to the remote SDK location with the absolute or relative path to your now locally hosted SDK
    • For example: (window,document,'https://prod.webpu.sh/YOURAPPLICATIONKEY/sdk.js','xtremepush','ga','dimension4'); could become  (window,document,'/webpush/sdk.js','xtremepush','ga','dimension4'); or similar depending on where you host the SDK.

 

 

 

 

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.