You can use site tracking in Google Analytics to track the types of information users search for on your website. Search metrics are pulled from the Search and Quick Search parts in Blackbaud NetCommunity.
1. | From the Google Analytics website profiles page, click Edit for the website profile to configure. The Profile Settings page appears. |
2. | In the Main Website Profile Information section, click Edit. The Edit Profile Information Page appears. |
3. | The values in the Profile Name and Website URL fields default from your account settings. You can change these if necessary. |
4. | Leave the Default page field blank because Blackbaud NetCommunity provides the URL for each page accessed. |
When you enable site tracking on your website, the program generates URL information Google Analytics uses to identify your web pages. These URLs are associated with your web page URLs and passed through the back end to Google Analytics.
Note: Parts that contain multiple steps generate additional URL information so you can track website users as they navigate through the steps. For information about these URLs, see Site Tracking URL Examples.
5. | In the Exclude URL Query Parameters field, enter “bm, erid, frsid”. |
6. | Under Site Search, select Do Track Site Search. |
7. | In the Query Parameter field, enter “txtSearch”. |
8. | Select Yes, strip query parameters out of URL. |
9. | For the Do you use categories for site search option, select No. |
10. | Click Save Changes. |
11. | Open Blackbaud NetCommunity. On the Administration page, select Sites & settings. |
12. | Select the site to configure and then select the Settings tab. |
13. | Under Site Tracking, select Enable Site Tracking. |
14. | In the Site Tracking Script box, enter the script provided by Google Analytics when you created the website profile. To track activity based on whether the user was logged in or visiting, add this section of code to the Google Analytics script. |
if(LOGGEDIN){
_gaq.push(['_setCustomVar', 1, 'userName', LOGGEDIN, 2]);
}else{
_gaq.push(['_setCustomVar', 1, 'userName', 'Visitor', 2]);
}
The combined script would be similar to this one. Your version should include the account ID provided by Google Analytics in place of UA-1XXXXXXXX-1.
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1XXXXXXXX-1']); if(LOGGEDIN){ _gaq.push(['_setCustomVar', 1, 'userName', LOGGEDIN, 2]); }else{ _gaq.push(['_setCustomVar', 1, 'userName', 'Visitor', 2]); } _gaq.push(['_trackPageview', BBNCAnalyticsURL]); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> |
Warning: This code is provided as an example to demonstrate where to add the code to track logged in users. The portion from Google Analytics may not be the most recent version. To ensure that you have the correct code, use the script Google Analytics provides when you create a website profile.
15. | To save the settings, click Save. |