Give Your Analytics Strategy a Boost with Website Code

12/12/2016

Push Your Analytics

When properly implemented, analytics can help B2B marketers better understand a customer’s journey...and tell that story to management. It helps show ROI and demonstrates marketing's influence to key stakeholders. As technology advances and the user experience changes, we see analytics being pushed further to track meaningful interactions on websites. Gone are the days of simply placing basic out-of-the-box analytics code on a site and measuring content with pageviews and time on site. Today, marketers demand technically complex tracking on their websites to accurately and effectively measure their marketing efforts. We often hear, “How can we track this?” This is where knowing custom coding can be very useful. Understanding code helps ensure that proper analytics are tracking the correct action, but moreover, it helps futureproof your tracking so you can be more flexible when making future website revisions. I’m going to give you some tips on how you can use code to make analytics work harder for you.

Google Analytics is typically the standard website tracking tool used out of all the software that’s out there. It’s versatile, easy to work with and, best of all, it’s free. For these reasons, this blog post is going to focus primarily on Google Analytics. It’s important to remember that tracking customer website interactions such as form submissions, video plays and downloads requires an additional set of JavaScript coding outside of what is provided by Google.

Four Considerations for Custom Analytics Implementation via Coding

  1. Tracking should be flexible – JavaScript is the go-to tool when implementing analytics tracking on a site. Thinking through your tracking strategy for your site may yield commonalities in your code that can be utilized to your advantage. A JavaScript file to house your commonly tracked items like downloads, outgoing link clicks, video plays and mailto link clicks not only saves you time down the road, but also makes sure that you’re always tracking these actions if you add new pages.
  2. Applying code without “breaking stuff” – Digital marketers often have a hard time looking at a page and extrapolating what interactions to measure. Moreover, figuring out how to track those actions correctly, without breaking code that is already implemented and while working with existing site functionality, can be daunting. Implementing event tracking on items like a form submit seems easy enough—add the event to the button click and you’re all set… almost. Here’s where coding comes in. Knowing code helps us understand how to hide the event behind the successful form submit, in turn ensuring more accurate data. If not, we set ourselves up for incorrect data and potential broken analytics.
  3. Clearing through the extraneous to implement meaningful/actionable analytics tracking – Many times, even though we have a clear tracking strategy, we question whether we need to track more in case someone asks about it later. When looking at form submission tracking, understanding code helps identify what additional parameters can be added to the event without a great deal of extra code.
  4. Google Tag Manager takes coding also – When it was launched several years ago, Google Tag Manager touted itself as a flexible tool for marketers without direct access to their site’s code. One thing that is not mentioned is the amount of code fundamentals needed to properly implement and track meaningful interactions. Although you’re implementing tracking through Google Tag Manager and the data layer on the site, you need to understand what to look for within the code for Google Tag Manager to push the data into your Google Analytics account.

Don’t let learning a little bit of code scare you away. It could make all the difference in your reporting—going beyond the basics to really understanding audience behavior while optimizing your analytics strategy along the way.

About the Author

Tyler Lowry
Digital Marketing Associate
Godfrey

I use my powers to translate data into meaningful reports and actionable insights for clients. LinkedIn

Privacy Policy

Sign up for updates

Resources

ESSENTIAL GUIDE: MARKETING TO AUTOMATION AND CONTROLS ENGINEERS

Reaching the automation and controls space has never been more daunting and complex. That’s why we’ve put together a comprehensive guide to help marketers reach engineers at OEMs and end users.

Access Guide »

QUICK-START GUIDE: How to Conduct Your Own B2B Research

Easy techniques for B2B research that you can start using right away.

Access Guide »

Back To Top