STUDENTS
arnold on Nov 03, 2018
Creating A Page And Uploading A PDF
This guide is written from my MBA digital marketing students. You will first create a page on your website where you can place a PDF for your fictional customers to download. Then we will set up the code to track the download event and we will confirm it is working in our real-time analytics.
To start, get signed into your website and go to your dashboard. (yoururl.com/wp-login.php)
To create a new page click the + NEW at the top of the page and then click PAGE.
Give your page a title and add some text. In the example below I change the first line of my text to H1 and the second to an H2 so it looks a little better when we publish the page. To change the font to a header (H1 or H2) hover over the text and click the “paragraph” option and change it to a heading.
We will then need to add a PDF to the page. Click the “Add Media” button as shown below.
Then click Select File and navigate to the PDF on your computer and select itand click “Open”. If you need the PDF to play with you can download it here: Lawn Care Schedule.
Once the File is selected you will see a screen that looks like this:
Click “Insert Into Page” in the bottom right.
You should have a page that looks similar to this:
You can publish the page if you want and take a look at it or just continue on with these instructions.
Setting Up The Download Tracking Event In Google Analytics
What we are interested in learning in this tutorial is how to set up an event that tracks downloads. There are several different ways you could set this up.
Since we only have one file that needs to be tracked, for this tutorial we will go ahead and manually tag the link with a little help from a program called RAVEN.
Go to: www.raventools.com/
Then Click on File Download
Fill out the form as I did or use your own terminology:
Once you get it filled out copy the first set of code as indicated by #4 above.
My code looks like this: onClick=”ga(‘send’, ‘event’, { eventCategory: ‘download’, eventAction: ‘click’, eventLabel: ‘lawn_care_schedule’});”
The URL of my PDF looks like this: http://seo-demo.com/wp-content/uploads/2018/11/Lawn-Care-Schedule.pdf
I need to combine these. To do this I am going to go into my website page editor and select “text” so that I can edit the html of the page post.
This is where you can add your tracking code to your URL. Take a look at the image below to see how I combined these. Do the same for yours and save your page.
You are now able to track downloads of your PDF.
How To Test Your Event To See If It Worked
We now want to test our event to see if it works. To do this is simple. We just need to check the events section of our real-time results in Google Analytics and trigger a download.
First open up an incognito browser. To do so on chrome follow the steps in the image below:
Load the page of your website that has the download button on it.
Then go to your Google Analytics and go to your real time results. Click on Events as shown below. Make sure you can see yourself in the real time results and then click download on your PDF in your website. You should see this:
If you can see the event then you set it up correctly. The last thing I am going to do is set this up as a goal so I can count it as a conversion in my analytics. To do this go to your goals in your analytics and set up a custom event goal as shown in the image below:
Make sure that the CATEGORY, ACTION and LABEL of the event all match the goal. Click Save and you should see this:
Now go to your real time results and click CONVERSIONS this time. Open up an incognito browser again and download the file once more. You will now see the download register as a conversion.