How to Get a Page Views Counter on Tumblr

By Randall Blackburn

Embed a page view counter to keep track of the number of visitors to your Tumblr blog.
i Digital Vision./Photodisc/Getty Images

Embed a page view counter in your Tumblr theme to display a running total of visitors to your blog. Several free script sites, such as Free Hosted Scripts, Totally Layouts and StatCounter, offer code widgets specially designed for Tumblr blogs. Create an account on the StatCounter site to access their code generation services. No registration is required for Totally Layouts and the Free Hosted Scripts site. Generate the page view counter code on the script site, then embed the code in your Tumbler theme.

Free Hosted Scripts

Open the Text Hit Counter page of the Free Hosted Scripts site in a browser (link in Resources).

Click the “Tumblr” radio button, then edit the widget as needed. For example, you can change the label “Hits:” to “Visits:” or another identifier of your choosing. You can also change the starting number for the counter.

Click the “Generate the HTML Code” button. The page refreshes with two boxes containing the counter code and detailed instructions for embedding the code.

Drag the cursor over all the code in the first box, then press “Ctrl-C” to copy the code to your clipboard.

Open your Tumblr dashboard in a new tab, then click the “Customize” link under the blog to edit. The blog theme opens in Edit mode. Click “Edit HTML” to open the code editor.

Locate the “</head>” tag in the HTML code. You can press “Ctrl-F” to open the Find box, then type “/head” to quickly locate the tag.

Click in front of the “</head> “ tag, then press “Ctrl-V.” The first code block is pasted in the code.

Return to the Free Hosted Scripts tab, then highlight all code in the second code box. Press “Ctrl-C” to copy the code to your clipboard.

Return to the Tumblr theme open in Edit mode, then locate the “</html>” tag at the bottom of the page.

Click in front of the tag, then press “Ctrl-V” to paste the second code block.

Click “Update Preview” to view the counter in the Preview pane, then click “Save” to save the changes.

StatCounter

Open the StatCounter in a browser (link in Resources). Create an account, then log in with your account credentials. The code is generated when you create your account.

Drag the cursor over the code in the code box to select, then press “Ctrl-C” to copy the code to your clipboard.

Open your Tumblr dashboard in a new tab, then click the “Customize” link under the blog to open the theme for editing. Click “Edit HTML” to open the HTML editor.

Locate the “</body>” tag in the HTML code. Press “Ctrl-F” to open the Find box, then type “/body” to quickly locate the tag.

Click in front of the “</body> “ tag, then press “Ctrl-V.” The code block is pasted in the code page.

Click “Update Preview,” then click “Save” to save the modifications. The page opens in the Preview window.

Totally Layouts

Open the Totally Layouts Tumblr Hit Counter page (link in Resources) in a browser, then click the “Tumblr” radio button. Edit the counter label and starting number, if desired.

Click “Create Counter.” The page view counter code is generated and displayed on the page.

Drag the cursor over all code in the box, then press “Ctrl-C.”

Open your Tumblr dashboard in a new tab, then click the “Customize” link under the blog to open the theme for editing. Click “Edit HTML” to open the HTML editor.

Locate the “</body>” tag in the HTML code. Click in front of the “</body> “ tag, then press “Ctrl-V.” The code block is pasted in the code page.

Click the “Update Preview” button, then click “Save.”

Warnings

If you use other public script sites, installation instructions may differ slightly or significantly.

×