01
Why an Indian store needs a cookie banner
The DPDP Act has no separate cookie rule. Where an analytics tag or ad pixel collects personal data for a use beyond running the site, the safe course is to ask first, with a clear notice and a no that is as easy as the yes (Section 6). Why that is, and which cookies need it, is at /blog/cookie-consent-dpdp.
Shopify has its own cookie banner, but its help page says it is set up for visitors in the UK and EEA when you sell there, and will not be active in other regions by default. A store that sells in India has to decide for itself what visitors in India see.
02
Step 1: copy the script tag
The tag looks like this, with your own page name in place of "your-page": <script src="https://ruly.in/p/your-page/banner.js" async> followed by its closing script tag.
Copy the exact tag from the Cookie banner page in the Ruly app. The "Copy snippet" button copies it whole, closing tag included, so you never type it by hand.
03
Step 2 on Shopify: paste it into theme.liquid
Shopify's help page gives the path: in your Shopify admin go to Online Store, click the horizontal menu icon next to your theme, then select Edit code. Shopify suggests you duplicate your theme first, so you have a copy to go back to.
Open the layout folder and then theme.liquid. Shopify's theme docs say this is the default layout file every theme must have, and that the content_for_header line must sit inside its head. Paste the Ruly tag as the first script inside the head, above the other scripts and above that line, then save.
Shopify also warns that if your code changes do not fit a theme update, the updated copy removes them. After you update or switch themes, open theme.liquid again and check the tag is still there.
04
Step 2 on WordPress: the Ruly plugin, or the theme header
The easy way is Ruly's WordPress plugin. Sign up free, open the Cookie banner page in the Ruly app and click "Download the plugin". In WordPress go to Plugins, Add New Plugin, then Upload Plugin, pick the zip file, click Install Now and then Activate. These are the upload steps on WordPress's own Manage Plugins page.
Then go to Settings, Ruly Cookie Banner, paste your site ID and save. The site ID is the page name in your script tag ("your-page" in the example above), and the Cookie banner page shows it with a copy button. The plugin loads the banner in the head of every page. It can also add a Privacy link to your footer, which stays off until you tick it.
Save your site address on the Cookie banner page and turn the banner on, then run "Check my site" to see the banner is found. The plugin holds known trackers, like Google Analytics, Site Kit and Meta Pixel, until people say yes. Scripts it doesn't recognise keep running until you mark them. Use Check my site to see what's on your site. Scripts written straight into your theme files, or placed in a post, page builder block or shortcode, are not held either; add those by hand with data-ruly="analytics" or data-ruly="ads".
The other way is to paste the tag yourself. On a self-hosted WordPress site, go to Appearance, then Theme File Editor, and open your theme's header.php, the file WordPress uses to build the site's header. Paste the Ruly tag as the first script inside the head, then click Update File. Use one way, not both: if you switch to the plugin, remove the tag you pasted so the banner does not load twice.
WordPress's own page warns that the editor makes no backup copies and that a theme update wipes changes made this way. It suggests a child theme instead. If you are not comfortable editing files, or your theme has no header.php, the plugin is the simpler choice.
05
Step 3: mark each tracker so it waits for a yes
The banner does not stop trackers on its own. You mark each one by hand, in the same place you pasted it. Change the tracker's opening tag from <script ...> to <script type="text/plain" data-ruly="analytics" ...> for analytics, or use data-ruly="ads" for ad pixels. Tracker code written inside the script tag works the same way.
A marked tracker does nothing until the visitor says yes to its category. A tracker you do not mark keeps running before a yes, whatever the visitor clicks.
Analytics
Tags that count visits and clicks. Mark them data-ruly="analytics".
Ads
Ad and retargeting pixels. Mark them data-ruly="ads".
Needed to run the site
The cart, login and checkout. Leave these unmarked. They do not wait for a choice.
06
What the banner cannot hold back
Ruly's banner can only hold back scripts you can see and mark in your theme. Some scripts load from places your theme does not control, and those can run before a yes.
Run "Check my site" in the Ruly app after you paste the tag. It shows each tracker it finds before and after a yes. For each one still running before a yes, turn it off if you do not need it, mark it if it sits in your theme, or change its own settings in the app or plugin that added it.
Shopify apps
Apps you install can add their own scripts to your store, outside theme.liquid.
Shopify customer events and app pixels
Shopify's help pages say app pixels come from marketing and data apps, and are managed in the Customer events section of your admin, not in your theme. Shopify says compliance with laws and consents for custom pixels is your responsibility.
WordPress plugins
Analytics, ads and chat plugins can print their own scripts, which never pass through header.php.
07
How Ruly does it
Ruly's cookie banner is on every plan. It shows Accept all and Reject all buttons of equal weight and a choice for each category, and it logs every choice with the time, the site and the banner version. Choices logged a month: Free 2,000, Ruly 10,000, Pro 50,000, Enterprise 50,000. One banner covers up to 3 site addresses.
On Shopify you paste one script tag; on WordPress the Ruly plugin adds it for you. On Shopify you mark your trackers by hand, as above; on WordPress the plugin holds known trackers and you mark the rest. "Check my site" in the app shows each tracker before and after a yes. Ruly has no Shopify app, so on Shopify the theme.liquid steps are how it works today.
Want to see what your site loads right now? The free check at /dpdp-website-check reads up to 5 pages of your site and lists the trackers it finds on each, and "Check my site" in the app reads up to 20. The free 2 minute check at /check gives you the rest of your to-do list.