Menu
Menu Sheet Overlay
Search
Search Sheet

Developing Without the Mobify Requirements

    The Mobify Tag and Service Worker are required to use the Progressive Mobile SDK.

    In exceptional circumstances, it may not be possible to add the Mobify Tag and Service Worker before development begins.

    Though the preferred solution is always to add the Mobify Tag and Service Worker, complex workarounds are possible:

    1) Charles allows the Mobify Tag and Service Worker to be injected

    2) Chrome Local Override allows only the Mobify Tag to be injected

    3) Tag Injector allows only the Mobify Tag to be injected

    Using Charles, an HTTP Proxy Application #

    The preferred workaround for local development is to use Charles, a paid Windows, Mac and Linux application, to add the Mobify Tag and Service Worker to responses from the website under development.

    Install Charles

    Import Rewrite Settings

    If you’re having trouble, checkout this video.

    Configure Charles to serve HTTPS

    Configure Charles for your Website

    Inject the Service Worker

    Chrome Local Override #

    The Local Override functionality was introduced in Chrome 65. It allows us to modify the HTML content returned from the server. It’s a simple process and this guide will walk you through on how to install Mobify Tag locally.

    For more information, visit Google Developer Guide.

    Tag Injector #

    The Tag Injector is a development proxy server that you can use to inject the Mobify Tag into a website. The Tag Injector cannot inject the Service Worker into a site.

    Build the Tag-Injected URL #

    To use it, you build a tag injector URL that embeds the target website URL. The supported URL patterns are:

    So to use the tag injector with www.example.com you’d build a url as follows:

    http://https.www.example.com.tag.mobifyproxy.com

    Open the above URL in Chrome and View Source ⌥⌘U. You will see the Mobify tag has been injected into the target website.

    Preview

    The tag that is injected is does not do anything by default. In order to activate it you need to preview using it. If you have a local development environment serving up your code locally, you can preview against that, otherwise you’ll need to push a bundle up to Cloud.