How to Track AO3 Fanfiction Statistics Using Google Analytics

For when the AO3 Statistics page just isn't enough.


We all know the addiction — the insatiable pull of the “Statistics” page as soon as you post a new fanfiction on Archive Of Our Own (AO3). The checking and rechecking and refreshing, hour after hour, day after day. How many people have read my fic? Did anybody give me kudos? Ooh, a comment!

Tracking your statistics on AO3 can provide a lot of basic information about how your fic is being received. Indeed, hit counts, kudos, bookmarks, comments, and subscriptions are all well and good. But what if you want more insight into the specific behavioural patterns of your readers? (In a total not creepy way, of course.) For instance, it might be useful to know at what hour of the day most people are reading your fanfiction so you can aim to publish a new work or chapter during that time period. You’ve spent a lot of time and effort writing a masterpiece, so you want to make sure as many eyeballs see it as possible.

Here’s where Google Analytics can help you out. Google Analytics is a free web analytics service that allows you to track and visualize your incoming website traffic. All you need is a free Google account (if you have a Gmail address, you already have one) and a little bit of setup time and you can begin collecting data about your fanfiction works on AO3. All it takes is a few steps.

And if, like many of us, you aren’t technologically inclined or don’t know the difference between “page views” and “page visitors” … have no fear! We’re here to walk you through how to track your AO3 fanfiction statistics using Google Analytics.

(Note: Our tutorial is based on a tutorial from Tumblr user essenceanddescent, but with more in-depth explanations and an extra step for how to filter out your own traffic.)

Part I — Google Analytics

1. Sign up for a Google account here.

2. Sign up for Google Analytics here.

3. On the Google Analytics dashboard:

  • Click on the “Admin” tab (the little gear icon) on the left sidebar.
  • Create a new account by clicking the blue “Create Account” button.”


4. Creating a New Account

You are going to create an account for the fic you would like to track. The great thing about Google Analytics is that you can create up to 100 free accounts, which means you can track up to 100 different fics if you so desire. (GLEAN ALL THE DATA!)

  • On the New Account page, enter the following information:
    • Account Name: [YOUR FIC NAME]
      • e.g. The Bold and the Beautiful
    • Website Name: [YOUR FIC NAME]
      • e.g. The Bold and the Beautiful
    • Website URL: [YOUR FIC URL]
      • e.g.
    • You can ignore the Industry Category dropdown box


  • Scroll down the page:
    • Click the blue “Get Tracking ID” button
    • Agree to the Terms of Use in the box that pops up


5. Get your Tracking ID

Once you complete step 4, you will receive a unique Tracking ID. This is the number you will add to your AO3 fic in order to track it. Write this number down. (Or, you know, copy and paste it into a blank Word document like a normal person.)


6. Create a Filter for Your IP Address

Remember how tempting it is to check and recheck and refresh your statistics page on AO3? We often do the same to our own fics — we’re proud of what we’ve written, so we like to check in on our works every now and then, whether to simply reread or do another check for spelling and grammar. But we don’t want our own traffic (click, click, click!) to show up in our Google Analytics statistics. To make sure you are only including your readers’ traffic, you can create a filter to exclude your own visits to your fic.

  • Use the little arrow to get back to the main “Admin” page. (Or just click the gear icon again.)
  • Under the “Account” column (left-hand side), click “All Filters.”
  • Click the red “Add Filter” button.


  • Name your filter whatever you want
    • e.g. My Apartment, My Office, The Coffee Shop I Spend Hours Writing In
  • Under “Filter Type,” select “Predefined” and choose the following options from the dropdown menus:
    • Select filter type: “Exclude”
    • Select source or destination: “traffic from the IP addresses”
    • Select expression: “that are equal to”
  • In the box that appears labelled “IP Address,” enter your IP Address.
    • Note: If you don’t know your IP address, just Google “my IP address” and copy/paste the number that Google spits out. Freaky deaky!


  • Scroll down the page:
    • In the “Apply Filter to Views” section, click to highlight “All Web Site Data” and click the “Add” arrow to move it into the box on the right.
  • Save the Filter.


There! That wasn’t so hard, was it? Now it’s time to log in to AO3.

Part II — Archive Of Own Own (AO3)

1. Login to AO3 and go to your “Works” page

From here, you are going to be pasting a basic HTML code snippet into each chapter of your fanfic. Don’t panic! It’s easy.

  • Click on “Edit” to edit your fanfiction.


2. On the “Edit” page:

  • Scroll down to the “Work Text” section and make sure the HTML view is selected. (If not, click the HTML button. Duh.)


  • Add the following code (created by Tumblr user essenceanddescent) at the bottom of your chapter text:
    • <img src=“;tid=[INSERT TRACKING ID]&amp;cid=1&amp;t=event&amp;ec=Ao3&amp;ea=[INSERT LABEL HERE]”>
    • Take note of the bolded bits. This is where you will insert your Google Analytics Tracking ID (the one you totally remembered to copy or write down, right?) and a Chapter Label (see below). Make sure there are no spaces or brackets leftover when you copy/paste.

A quick note about chapter labels. Each chapter in your fic will need to have a different label so that when we look at our data in Google Analytics, we can easily identify which is which. Use standard characters (and no spaces) to come up with a label that describes the particular chapter (e.g. Prologue, Chapter1, Chapter2, etc.). The names of the labels do not matter, but to me it makes the most sense to use some version of Chapter1, Ch2, etc. You can even use the names of your individual chapters if you’d like. Whatever floats your boat.


  • Click “Post Without Preview” to save.
    • Note: Adding this HTML code snippet won’t actually add anything visible to the bottom of your fanfiction. If done correctly, the code should not show up at all once you’ve saved the fic. (But you’ll know it’s there… surveying… biding its time.)

3. Repeat Step 2 for each chapter in your fic

This means inserting the same HTML coded snippet at the end of each individual chapter. Don’t forget to change the chapter label (Chapter1, Chapter2, etc.).

Congratulations! You’ve successfully begun tracking your reader traffic using Google Analytics and AO3. But, sadly, you won’t be able to see all the juicy data right away. It will take a few days for Google Analytics to start picking up the traffic from your AO3. Be patient! Learn how to create fanart, map out a plot for a new fanfic, or browse the FAN/FIC Magazine archives (yeah, yeah, do that!).

Once you’ve set up your data tracking and waited about a week’s time, continue on to Part 2: How to Interpret Your AO3 Fanfiction Statistics Using Google Analytics.

Was this article helpful? Consider buying the author a coffee.

About Marty Stu (7 Articles)
Marty Stu lives a dangerous lifestyle and is desired by all women. He is also a multi-user pseudonym for writers who wish to publish anonymously for FAN/FIC Magazine.

15 Comments on How to Track AO3 Fanfiction Statistics Using Google Analytics

  1. I am also having this issue, I am not getting any data from the page even though the view count for the fic has gone up. Not sure why it isn’t working…

  2. Thanks for the helpful tutorial. I retyped the double quotes in the tag and that got it working 🙂

  3. Just wanted to mention that I found this tutorial very helpful! For others trying to do this, please retype the double quotes in the tag! That got it working for me.

  4. Hi, thank you for the tutorial! One question though. Do I have to add the global site tag code google provides to my story (each chapter) as well? If so, it’s says add to but I’m kind of unclear what that means exactly.

  5. eloquentelegance // November 16, 2019 at 11:49 pm // Reply

    I placed the code in my fic, and replaced ” in the code. However, Google Analytics is still not receiving data from my page.

  6. bipabrena // May 4, 2019 at 1:08 am // Reply

    Thank you for this, I really appreciate it! Sometimes I get kudos and bookmarks on some fics and I have no idea which ones because I’ve written so many, so this will come in handy. Thank you again!

  7. Can you use this method for multiple fics on the same account, or do you need a new account for each one?

  8. I did it but then the code ends up simplifying into only ” “. So i think it’s not working.

  9. Would this same method work for series?

    • I don’t see why not! Although I believe it would follow the exact same steps because you can’t really edit the HTML of a series as a whole (to my knowledge… although perhaps you can add some basic HTML code in the series description box), so you’d just have to add the code to each fic in the series like normal. Then it’s up to you how you label everything. 🙂

  10. I followed the steps as described but Google Analytics doesn’t seem receive any data…
    I did, however, notice that the full < img src= >code turns into a simple whenever I reopen the chapter in question for some other editing…

    • Hmmm, this might have something to do with switching between HTML and Rich Text mode during subsequent edits. Trying switching back to HTML mode before saving and checking that the Google Analytics code is accurate.

    • crystalfires // May 9, 2018 at 7:13 pm // Reply

      I had the same problem. I replaced the curly quotes with straight ones in the code and the code stayed put when I checked after saving.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: