Build Without a Mobify Tag Installed
Follow this tutorial to temporarily bypass the installation of the Mobify Tag while you build your mobile site.
Build your site without installing a Mobify tag if:
- the tag needs IT approval before its installation
- the tag is accidentally missing on some pages
Install the Mobify Tag before you launch the mobile site. This tutorial allows you to temporarily build your site while you install the tag.
1. Download Charles
Charles is a web debugging proxy application. We can use it to inject the Mobify tag on your site, using its Rewrite Tool, when accessing your site on your computer.
This does not inject the tag for your site visitors — just for your computer.
2. Get the Mobify Tag
You have access the Mobify Tag at any time. To retrieve the tag, follow these steps.
In your browser, go to Mobify Cloud at https://cloud.mobify.com.
Click on your Adaptive.js project.
On the "Bundles/Configure" link button cluster, click the "Configure" link button.
In the side menu links, click "Tag".
Scroll down to the "Install Tag" section, then copy the Mobify Tag from the HTML in the text box.
3. Add the Charles Rewrite Rule
1. Open Charles.
2. On the Charles menu bar, navigate to the "Tools" menu.
3. In the "Tools" menu, select the "Rewrite" menu option.
4. In the "Rewrite Settings" dialog box, enable the “Enable Rewrite” toggle.
5. Also in the "Rewrite Settings" dialog box, under the "Sets" section, click the "Add" button to create a new rewrite rule.
6. In the "Name" form field, type in the name of the new rewrite rule.
7. Under the "Locations" section, click the "Add" button.
8. In the "Edit Location"* dialog box, leave all of the form fields blank, except for the "Host"** form field.
9. In the "Host" form filed, enter the URL of your site:
- Host:
www.yourSiteURL.com
10. Click the "OK" button.
11. In the "Rewrite Settings" dialog box, under the "Rules" section, click the "Add" button to create the actual rule.
12. In the "Rewrite Rule" dialog box, enter these values into their respective form fields:
- Type: Body
- Where: Response
- Match:
- Value:
<head>
- Value:
- Replace:
- Value:
<head><!--paste the Mobify tag here-->
- Enable the "Replace First" toggle.
- Value:
13. Click the "OK" button to set these values in the "Rewrite Rule" dialog box.
14. In the "Rewrite Settings" dialog box, click the "Apply" button. Then click the "OK" button.
Leave the Charles application open to run for the next step.
4. Verify Tag Spoofing
In your local computer browser, go to your website.
Check the page source to verify that the Mobify tag is now in the
<head>
section.
It takes a moment for spoofing to activate. Spoofing occurs only on your local computer that is running Charles.
Now you have enabled the Mobify tag spoofing on your site on your local computer! Visitors that access your site over the internet still do not have the Mobify tag. Make sure that you install the Mobify tag before you deploy your mobile site.
Edit in GitHubPreviewing Follow the Preview your Project on a Device or Preview your Project tutorials to preview your site.