Skip to main content

Cloudflare Web Analytics

Gerai Digital linked to Cloudflare Web Analytics

Analytics & Ads add-on

This is part of the Analytics & Ads add-on, RM 12 a month on any plan and included in Tree. Without it, these settings are locked.

Connect a store to your own Cloudflare Web Analytics to see how many people visit it, which pages they view and where they come from. Cloudflare doesn't charge for it, and it doesn't use cookies, so your store doesn't show shoppers a cookie notice for it.

Each store connects its own, so different stores can report to different Cloudflare sites. You only need your site token. Gerai Digital adds Cloudflare's code to your store for you.

Cloudflare or Google Analytics?

Cloudflare Web Analytics shows visits, page views, top pages, where visitors come from, countries, devices and how fast your pages load. It's simpler than Google Analytics, which also tracks conversions and works with Google Ads but uses cookies. You can use either one, or both.

What you need​

A free Cloudflare account. Your store doesn't need to be on Cloudflare.

Find your token​

  1. Sign in to the Cloudflare dashboard and open Web Analytics (under Analytics & Logs).
  2. Choose Add a site.
  3. Enter your store's address, for example yourstore.gerai.digital, or your own domain if you use one, and choose Done.
  4. Cloudflare shows a short piece of code. Copy all of it. Your token is the long string of letters and numbers after "token":.
You don't need to paste the code into your store

Cloudflare asks you to add the code to your website. Skip that. Gerai Digital writes it into your store for you, using your token.

Connect it to your store​

  1. In your Gerai Digital dashboard, open the store and choose the Settings tab.
  2. Choose Analytics & Ads.
  3. Choose the Cloudflare Web Analytics tab, paste the code or only the token into Site token and choose Save.

Gerai Digital keeps only the token from the code you paste.

Check it's working​

Visit your store, then open Web Analytics in Cloudflare and choose your site. Your visit shows up within a few minutes.

Visits from the template editor's preview aren't counted, so editing your store doesn't add to your numbers.

See reports in Gerai Digital​

You can also see this store's Cloudflare Web Analytics in its Analytics tab in Gerai Digital, next to Settings. It shows visits and page views against the period before, visits per day, and your top pages, traffic sources, countries and devices, for the last 7, 28 or 90 days. If you also connected Google Analytics, switch between the two with the tabs at the top.

To turn it on, create a read-only API token in Cloudflare, then give it to Gerai Digital with your account ID.

Create a read-only API token​

  1. In the Cloudflare dashboard, open My Profile › API Tokens and choose Create Token.
  2. At the bottom, next to Create Custom Token, choose Get started.
  3. Give the token a name, such as Gerai Digital.
  4. Under Permissions, add these two rows:
    • Account › Account Analytics › Read
    • Account › Account Settings › Read
  5. Under Account Resources, choose Include and the account your site is in.
  6. Choose Continue to summary, then Create Token, and copy the token. Cloudflare shows it only once.

Both permissions only read. Gerai Digital can't change anything in your Cloudflare account.

Add it to your store​

  1. In Cloudflare, open Account home, choose the menu next to your account name and choose Copy account ID.
  2. In Gerai Digital, open the store, choose Settings › Analytics & Ads › Cloudflare Web Analytics, and under Show reports in Gerai Digital, paste the Account ID and the API token.
  3. Choose Save and check. When you see Reports connected, open the store's Analytics tab.

If the check says Cloudflare didn't accept the token, make sure it has both permissions and includes the same account as your site. If it can't find your site token, check you copied the site token from that same account.

When the numbers show up​

Reports update every hour. Choose Refresh at the top of the tab to get the latest now. Cloudflare counts days in UTC, 8 hours behind Malaysia, so a visit late at night can count on the next day. On busy stores, Cloudflare counts a sample of visits and estimates the rest.

To stop Gerai Digital reading your reports, clear the Account ID and choose Save and check. Gerai Digital forgets the API token. You can also delete the token in Cloudflare under My Profile › API Tokens.

Stop tracking​

Go back to Settings › Analytics & Ads › Cloudflare Web Analytics, clear Site token and choose Save. Cloudflare's code is removed from your store.