Linux Tutorial | Matt Cooper - Open Source Support
Linux Tutorial | Matt Cooper - Open Source Support
Google Analytics

Track a Link as an Event – Google Analytics

1. Build the tracking code for the link using RavenTools form:

http://raventools.com/gaconfig/google-analytics-event-tracking/general-event/

2. Insert the tracking code into your link e.g.

<a href=”http://bigapple.com/login” onClick=”ga(‘send’, ‘event’, { eventCategory: ‘Survey’, eventAction: ‘Take Survey’, eventLabel: ‘Clicked’});”>Login</a>

Continue reading

March 23, 2016by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Google Analytics

Contact Form 7 Event/Goal Tracking with Google Analytics

1. Remove Yoast Analytics plugin if installed

*caused a number of tracking and confirmation issues

2. Make sure Google Analytics Universal tracking code is setup

3. Edit the contact 7 form > Scroll to “Additional Settings” > Insert the following:


on_sent_ok: "ga('send', 'event', 'Contact Form', 'sent');"

4. Login to the analytics admin panel and add a new goal

Goal Setup – Custom

Goal Description – Name and Type: Event

Goal Details:

google_analytics_eventtracking

 

Save

5. Fill in the form > Take a look at Real Time reporting – Conversions to see the Contact Form goal in action

July 23, 2015by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Google Adwords, Google Analytics

Google Adwords – Dynamic Landing Page with Dynamic Keyword Insertion

Google Adwords Configuration

Append the following to the destination URLs of your ads: ?kw={keyword}

This will dynamically enter the keyword into your ad’s destination URL i.e. it will add what the user has searched for.

Landing Page Code

The following PHP code takes the keyword the user searched with to find your Ad and then click on it:

<?php
if ($_GET['kw'])
{
$kw = htmlentities($_GET['kw']);
}
?>
<?php
if ($_GET['kw'])
{
echo "<div id='adwords'>You searched for <b>\"".$kw."\"</b> on www.google.com.</div>";
}
?>

It lifts the keyword and displays it on screen.

Manually test with the URL the page is on – http://www.domain.com/landingpage/?kw=bigtester – You searched for “bigtester” on www.google.com should appear on screen.

Credit goes to – http://streamlinemetrics.com/blog/adwords-conversion-rate-optimization-tip-add-keyword-to-landing-page-with-dynamic-keyword-insertion.php

June 24, 2015by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Google Analytics

Track YouTube Videos with Google Analytics – without Tag Manager

After a few hours head scratching I was finally able to make sense of the lunametrics code which essentially looks for embedded YouTube video(s) on your page and triggers event tracking on Google Analytics for:

  • Unstarted
  • Play
  • Watch to End
  • Pause
  • Buffering
  • Cueing

1. Insert the following code into page inside the body tags:

<script src="//cdn.jsdelivr.net/youtube-google-analytics/8.0.2/lunametrics-youtube.gtm.min.js"></script>

*Page obviously must have Google Analytics tracking code within the <head> tags

Continue reading

May 19, 2015by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon

About me

Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: matt@linuxtutorial.co.uk

Recent Comments

  • Andrew on Export list of Amazon EC2 Instances to CSV
  • Matt Cooper on Proxmox – add a second hard drive to node for Backups
  • karis on Proxmox – add a second hard drive to node for Backups
  • Matt Cooper on Remote MySQL Database – Slow Connection
  • Matt Cooper on Bash script to send public IP address to Email

Categories

  • AdvancedTomato
  • Amazon AWS
  • Amazon Linux
  • Amazon S3
  • Apache
  • Apache Kafka
  • Backup Tutorial
  • Bash Scripting
  • Centos Tutorial
  • CloudFlare
  • Command line Tutorial
  • CPanel Troubleshooting
  • CPanel Tutorial
  • Debian Troubleshooting
  • Debian Tutorial
  • DKIM
  • Docker
  • EC2
  • ESXi
  • Faildows
  • Google Adwords
  • Google Analytics
  • Google Chromebook
  • Google Mail
  • graylog
  • IAM
  • imapsync
  • iRedmail Tutorial
  • ISPConfig3 Tutorial
  • Java
  • ldap
  • letsencrypt
  • MyDNS
  • MySQL Troubleshooting
  • MySQL Tutorial
  • Nest Install
  • Netbeans
  • Nginx
  • Nginx Troubleshooting
  • openssl
  • PCI Compliance
  • Percona
  • PHP
  • Plex Media Server Tutorial
  • Postfix
  • Proxmox Tutorial
  • Pure FTPd
  • Resourcespace Tutorial
  • Route 53
  • Rsync Tutorial
  • Security
  • Smoothwall Troubleshooting
  • Smoothwall Tutorial
  • SSH
  • tcpdump
  • Thunderbird
  • Tomcat Troubleshooting
  • Ubuntu Tutorial
  • Uncategorized
  • Unison
  • vmware
  • vzdump
  • WHM
  • Wireshark
  • Wordpress Troubleshooting
  • WordPress Tutorial

“See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too." Linus Torvalds

© 2017 copyright www.linuxtutorial.co.uk // All rights reserved