Event Tracking for dropdown list

649 views
Skip to first unread message

Karen

unread,
Mar 25, 2015, 10:33:11 AM3/25/15
to google-analyti...@googlegroups.com
Hello all,

I'm new to implementing event tracking and need a little guidance. I did a fair bit of searching in the google forums but couldn't find anything that answered my questions. Apologies if this is in the wrong forum.

I manage an ecommerce site (Shopify) that is currently running UA with enhanced ecommerce and that's working fine. I just implemented a currency switcher so folks can see the prices of items in their local currency. There are two parts to the switcher.
1. A drop down list that shows various currencies. Note: The list of currencies is generated by pulling from a settings file (site admins can add/remove currencies via a GUI instead of editing code in pages. The code is a simple <select> / <option> setup but as mentioned the <option> line pulls from the settings file.
2. Once a currency is selected then a script is invoked (separate file from #1) that does the currency conversion.

This dropdown is in the main theme so exists across all pages.

It looks like event tracking is already on the site because I see things that appear to be interaction with the checkout button, etc. I don't know if this was setup by the previous technical person or whether this gets enabled when you enable GA within the Shopify setup.

Ultimately what I would like to see which currencies were selected (right now only four are enabled... CAD, USD, EUR and GBP) but would be happy with just seeing the number of clicks to the dropdown even if the currency isn't passed.

So my questions are:
1. If I'm seeing Event activity in GA reporting does this mean the script is there and if so do I still need to add script again to track the dropdown? I came across this page: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide#intro that has this code (not sure if that's the correct code): _trackEvent(category, action, opt_label, opt_value, opt_noninteraction). I have been through all of the pages for the site and obviously found the code for general tracking but haven't seen anything related to the event tracking script. 
2. If event tracking is there what do I need to do to get this setup? I have seen various posts mentioning an onclick event.
3. Can this be setup via Tag Manager?

Here is the code for the drop down:
<label for="currencies">Currency </label>
<select id="currencies" name="currencies">
  {% capture codes %},USD,EUR,GBP,CAD,ARS,AUD,BBD,BDT,BSD,BHD,BRL,BOB,BND,BGN,MMK,KYD,CLP,CNY,COP,CRC,HRK,CZK,DKK,DOP,XCD,EGP,XPF,FJD,GHS,GTQ,GYD,GEL,HKD,HUF,ISK,INR,IDR,NIS,JMD,JPY,JOD,KZT,KES,KWD,LVL,LTL,MXN,MYR,MUR,MDL,MAD,MNT,MZN,ANG,NZD,NGN,NOK,OMR,PKR,PYG,PEN,PHP,PLN,QAR,RON,RUB,SAR,RSD,SCR,SGD,SYP,ZAR,KRW,LKR,SEK,CHF,TWD,THB,TZS,TTD,TRY,UAH,AED,UYU,VEB,VND,ZMK,{% endcapture %}
  {% assign supported_codes = settings.supported_currencies | split: ' ' %}
  <option value="{{ shop.currency }}" selected="selected">{{ shop.currency }}</option>
  {% for code in supported_codes %}
    {% if code != shop.currency and codes contains code %}
    <option value="{{ code }}">{{ code }}</option>
    {% endif %}
  {% endfor %}
</select>
</div>


Thanks in advance for all suggestions provided.


Karen
Reply all
Reply to author
Forward
0 new messages