Setting Up an EventEvents are much easier to setup then you might imagine. All you need to do is add a little piece of customized code to the URL a visitor will be clicking on to trigger the event, and you're halfway there. Let's start with understanding what our event tracking options are.
There are five fields in total that you can use to categorize your event, two of which are optional:
Category: The general name of the type of event you wish to track. If you'll be setting up events of a similar topic (like form submissions), you'll want to keep this consistent across all of the events you setup.
Action: A description of the action the visitor is taking to trigger the event. So if your category is set to "Forms", your action might be set to "Sales Inquiry".
Label: This is an optional field used to further describe the type of event. If you're tracking multiple forms of the same type (like contact forms), you may consider using this field to avoid any confusion with the other events.
Value: Suppose each micro conversion does have a monetary value of sorts for you, this is the field you'd use to track that numeric number.
Non-Interaction: A true/false field that you can use to prevent a visitor who completes the event and leaves your domain from being recorded as a bounce in Google Analytics
Still with me? Now here comes the fun part: building the event tracking script.
The framework of your event tracking script looks like this:
onClick="_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', Value, false]);"
There are a couple of things you need to remember when you customize the various fields in the script (e.g. "Category"):
You must fill in the Category, Action and Non-Interaction fields
The Value and Non-Interaction fields do not have a single quote around around them like the others
If you choose to omit the Label or Value fields, also omit the single quote but not the comma that separates them from the other fields. In this example I've ommitted both fields, but not their commas:
onClick="_gaq.push(['_trackEvent', 'Category', 'Action',,, false]);"
The Non-Interaction field can only be set to true or false (remember: no quotes!)
Now that you've set up the script, you should place it within the href component of any link you are setting up. Here's an example of what it would look like:
Follow us on Twitter!
The final piece of the puzzle is adding the event as a goal in Google Analytics.
Click the gear icon in the upper right corner of the Google Analytics profile you're setting up the goal in
Using the sub-navigation where your Profile information is listed, select the Goals tab
Choose the goal set you wish to add the event to (I like to categorize my goal sets)
After you name your goal, select the Event radio button
You now need to populate the event details exactly how you set them up in your script. If you omitted a field, just leave it blank
There are five fields in total that you can use to categorize your event, two of which are optional:
Category: The general name of the type of event you wish to track. If you'll be setting up events of a similar topic (like form submissions), you'll want to keep this consistent across all of the events you setup.
Action: A description of the action the visitor is taking to trigger the event. So if your category is set to "Forms", your action might be set to "Sales Inquiry".
Label: This is an optional field used to further describe the type of event. If you're tracking multiple forms of the same type (like contact forms), you may consider using this field to avoid any confusion with the other events.
Value: Suppose each micro conversion does have a monetary value of sorts for you, this is the field you'd use to track that numeric number.
Non-Interaction: A true/false field that you can use to prevent a visitor who completes the event and leaves your domain from being recorded as a bounce in Google Analytics
Still with me? Now here comes the fun part: building the event tracking script.
The framework of your event tracking script looks like this:
onClick="_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', Value, false]);"
There are a couple of things you need to remember when you customize the various fields in the script (e.g. "Category"):
You must fill in the Category, Action and Non-Interaction fields
The Value and Non-Interaction fields do not have a single quote around around them like the others
If you choose to omit the Label or Value fields, also omit the single quote but not the comma that separates them from the other fields. In this example I've ommitted both fields, but not their commas:
onClick="_gaq.push(['_trackEvent', 'Category', 'Action',,, false]);"
The Non-Interaction field can only be set to true or false (remember: no quotes!)
Now that you've set up the script, you should place it within the href component of any link you are setting up. Here's an example of what it would look like:
Follow us on Twitter!
The final piece of the puzzle is adding the event as a goal in Google Analytics.
Click the gear icon in the upper right corner of the Google Analytics profile you're setting up the goal in
Using the sub-navigation where your Profile information is listed, select the Goals tab
Choose the goal set you wish to add the event to (I like to categorize my goal sets)
After you name your goal, select the Event radio button
You now need to populate the event details exactly how you set them up in your script. If you omitted a field, just leave it blank
No comments:
Post a Comment