Getting Started > Shopify Installation

Shopify Installation

This guide outlines how to Photolock on a Shopify store.

It only takes a few minutes to install Photolock on your website. Once installed, you’ll be able to control & limit actions that your website's visitors can perform on your site.

Automated Installation

You can install Photolock at Shopify App Store. Select a plan to start your free trial and the code will be automatically added to your Shopify theme. 

Manual Installation

In case you need to manually install Photolock, you can follow steps below.

Just copy the first code snippet in your Photolock dashboard.

Or you can quickly grab it from here instead:

<script type="text/javascript" id="photolockScript" src="{{shop.permanent_domain}}" async defer></script>
<noscript id="photolockNoscript"><style>body *{display:none}body:before{content:"Please enable javascript to view this site"}</style></noscript>

How to use the code 

  • Paste the code right before the closing head tag of every page.
  • IMPORTANT: If you copy the code snippet above you'll need to manually change your shop (this is called your shop or website domain id in the code). 
  • You’ll need to open your website under the web domain that is part of the id value. The app will not work in preview or development modes.

Configure Domain:

After you install the script on your site, go to Photolock dashboard and click "Locks" in the navigation menu.

Find Website settings and add your custom domain
Domain settings in Photolock dashboard

Your website domain must match the value here. Most websites these days use multiple domains. At a minimum, you have a domain with "www" and also a root domain as shown below.

Therefore it is important to configure a primary domain for your website and add redirects to the primary domain. Photolock only accepts a single domain. In case users visit your site with other domains and there are no redirects to primary domain, Photolock will not activate.

In Shopify, you can configure your primary domain under Online Store > Domains
Shopify Domain Settings
Now you're ready to start using Photolock. 

Last Updated: September 9, 2020