Why would the Vermont legislation endanger the livelihood of their independent business constituents?

Yesterday, at 3:34 PM, I received the following email from Amazon:


We are writing from the Amazon Associates Program to notify you that your Associates account will be closed and your Amazon Services LLC Associates Program Operating Agreement will be terminated effective January 6, 2015. This is a direct result of Vermont’s state tax collection legislation (32 V.S.A. § 9701(9)(I)). As a result, we will no longer pay any advertising fees for customers referred to an Amazon Site after January 5, nor will we accept new applications for the Associates Program from Vermont residents.

Please be assured that all qualifying advertising fees earned prior to January 6, 2015, will be processed and paid in full in accordance with your regular advertising fee schedule. Based on your account closure date of January 6, 2015, any final payments will be paid by March 31, 2015.

Amazon strongly supports federal legislation creating a simplified framework to uniformly resolve interstate sales tax issues. We are working with states, retailers, and bipartisan supporters in Congress to get legislation passed that would allow us to reopen our Associates program in Vermont.

We thank you for being part of the Amazon Associates Program, and hope to be able to re-open our program to Vermont residents in the future.

The Amazon Associates Team

This email announced immediate termination of all Vermonters’ Amazon Affiliate accounts.

What is the Amazon Affiliates program?

The Amazon Affiliate program allows me to earn commission on referrals that originate from links on my websites and YouTube channel.  When I published this Nissan Pathfinder Knock Sensor repair video  on YouTube in 2010, I added Amazon Affiliate tagged links to tools and parts I used in the video.  When someone clicked the link and made a purchase on Amazon, I received a commission between 5 and 10%.  Since 2010 this has generated passive income for me of a few thousand dollars.  This will have a large impact on Vermont creatives that blog and depend on this revenue stream for a large portion of their income.   The Amazon affiliate link can be seen in the screenshot of my video below.  This one link has generated 2,115 clicks and 248 orders since January 2012.

Amazon Affiliate Link Vermont Amazon Tax

OK, So what changed?

In 2011, the Vermont legislation amended the Sales and Use tax law definition of a ‘vendor’ to include internet affiliate programs such as Amazon (source).  This was dubbed the ‘Amazon tax’.  It’s not clear when this law change took effect, but it may have been the first of this year.  An excerpt of this Vermont statute 32 VSA 9701 (9)(I), can be found below:

(I) For purposes of subdivision (C) of this subdivision (9), a person making sales that are taxable under this chapter shall be presumed to be soliciting business through an independent contractor, agent, or other representative if the person enters into an agreement with a resident of this State under which the resident, for a commission or other consideration, directly or indirectly refers potential customers, whether by a link on an Internet website or otherwise, to the person if the cumulative gross receipts from sales by the person to customers in the State who are referred to the person by all residents with this type of an agreement with the person are in excess of $10,000.00 during the preceding tax year. For purposes of subdivision (C) of this subdivision (9), the presumption may be rebutted by proof that the resident with whom the person has an agreement did not engage in any solicitation in the State on behalf of the person that would satisfy the nexus requirements of the United States Constitution during the tax year in question.

The vagueness of this line is of particular concern:

directly or indirectly refers potential customers, whether by a link on an Internet website or otherwise

This has the potential to impact other much more significant revenue streams that Vermont bloggers depend on such as Google’s AdSense.  (Google AdSense is a program that pays you to put ads on your website.)  It’s unclear at this point the extent to which this law change will impact the income of Vermont’s bloggers and content creators.

For me personally, it means I will be shutting down a website that relied heavily on revenue from Amazon affiliate links.  It also makes me question whether it’s worth posting ‘how to’ videos such as the one above that take a significant amount of time to produce.

Questions or concerns?  Please leave a comment below.


Special thanks to Cairn Cross (@vtcairncross) for providing me information regarding the ‘Amazon tax’ passed by the Vermont legislature.

You can also follow this story on VPR online at “Amazon shutters Vermont program over tax issue.



To take advantage of the new cross device measurement reports in Google Analytics, you need to enable the User ID functionality.  For these reports to be of any value, you need to be tracking user interaction across all of your web and mobile touch points against the same GA Property ID.  The property ID is that funky UA-XXXXXX-XX value that Google assigns you when you create a new Google Analytics property.

A typical hierarchy with views might look like this:

  • Client/Property Name (The UA-XXXXXXX-XX is assigned here)
    • Web Rollup View (Tracks all web hits – no filters)
    • Web Site Subdomain (For tracking a particular portion of your site  - filters to a specific subdomain)
    • Web Site Subdirectory (For tracking a particular portion of your site – filters to a specific subdirectory)
    • Mobile App Rollup (Tracks both iOS and Android hits for segmentation and aggregate reporting)
    • Mobile App iOS (Only tracks iOS SDK hits – Filtered to iOS operating system)
    • Mobile App Android (Only tracks Android SDK hits – Filtered to Android operating system)
    • User ID (Tracks authenticated users across all platforms)

In the above hierarchy, the top 3 views are ‘Web Site’ type and the bottom 3 are ‘Mobile’ type.  The last profile is the User ID profile that only records traffic when a User ID is passed along with the Google Analytics pageviews and events.  This enables those snazzy cross device measurement reports.

What you may not realize is that as of version 3.0.0 of the iOS and Android SDKs released on August 6th, 2013, the mobile SDKs were modified to record hits in the same manner as the web version.  While web and mobile profiles differ in tracking pageviews (screens in mobile), the sessions are similar.  As a result, your mobile sessions may be reflected in your web profiles and vice versa.  Oh the humanity!


How do I know if I’m affected?

The quickest way to see if you’re affected by this, is to look at the Audience > Technology > Browser & OS report.  If you see a browser ‘GoogleAnalytics’, then you’re affected.  This is the browser the Android and iOS SDKs pretend to be when they record hits.



See how the report is showing the ‘GoogleAnalytics’ browser sessions, but no pageviews?  You can imagine the havoc this wreaks on your computed metrics such as bounce rate, pages/session and so on.


How do I fix it?

To prevent mobile SDK hits from sneaking into your web views add the following rule to all of your web views:

Screen Shot 2014-06-08 at 6.07.19 PM


** Hint: Once you save this rule, you can use it in other views.

To prevent web hits from showing in your mobile profiles, add this rule:

Screen Shot 2014-06-08 at 6.09.45 PM

Once you add these rules, you’ll be accurately reporting web hits and sessions in your web views and mobile hits and sessions in your mobile views.   Keep in mind that you should not add either of the above rules to your User ID views.   Doing so will remove the data needed to generate the cross device measurement reports.

Questions or comments?  Get in touch with me on Google+ or leave a comment below.



Update 6/9/2014: Jump to the end of this post for a solution that obviates the need for two tags.

A week ago, I migrated a site to use Universal Analytics (UA) from classic GA.  As part of the migration, I wanted to enable the new User ID functionality which lets you pass a User ID for authenticated (signed in) with each GA hit.  This gives Google Analytics a common identifier to the ‘connect the dots’ across visits where cookies aren’t shared.  That way when a user visits from multiple machines and mobile devices, you have visibility into their behavior through the new Cross Device Measurement reports in Google Analytics.

The site being upgraded to UA was using Google Tag Manager which makes migrations of this nature a breeze.  I disabled the classic Google Analytics tag and added the new Universal Analtyics tag.  To enable the User ID feature, you need to add a row in the ‘Fields to Set’ section.

Screen Shot 2014-06-08 at 4.26.16 PM


The value field is populated with my {{uid}} macro which is the customer identifier that is passed to the data layer when a user is authenticated.  What I didn’t realize is that when the user isn’t signed in, the {{uid}} is empty, but the &uid field is still passed to the Google Analytics hit.   This caused a significant drop in pageviews, because for some reason when the UID field is empty, Google Analytics isn’t tracking them.

The workaround is to create two versions of your Universal Analytics tag to handle authenticated and non-authenticated scenarios.  For the authenticated users, you want a firing rule similar to this:

Screen Shot 2014-06-08 at 4.37.07 PM


This rule uses RegEx to test that the {{uid}} is a valid GUID (the customer identifier on this particular site) and fires on all pages.

For the non-authenticated (no User ID to populate), modify your Universal Analytics tag so the ‘Fields to Set’ is not being populated with the ‘&uid’ field.  The firing rule for this tag will simply be the ‘All Pages’ rule.  Now add a blocking rule using the rule created above (All Authenticated Pageviews) that only fires when the {{uid}} macro is a valid GUID.

Now  you have two versions of your Universal Analytics tag.  One will fire when users are authenticated and pass the User ID.  The other tag will fire for anonymous users and not populate the User ID field.  This will resolve the issue of pageviews not being properly recorded due to the empty User ID field.

Don’t forget to do this same workaround for any event or ecommerce tags you have implemented in Google Tag Manager.

As a final note, I have reached out to the Google Analytics team asking if this is the intended behavior as I suspect others will encounter this same issue.  I will update this post based on their response.

Update 6/9/2014: Thanks to Simo Ahava, there is a solution that eliminates the need for two using two tags.  For this version, you’ll only need one Universal GA tag, one rule  (All Pages) and two macros ({{uid}} and {{Get User ID}}.  In the Universal GA Tag fields to set, you’ll use a JavaScript macro {{Get User ID}} that will do a check to see if the User ID value is empty or not.  If it is, it simply returns which sets the {{Get User ID}} macro to undefined.  Google Analytics does not pass undefined values as part of the hit, so you avoid the problem I encountered previously.  Here’s what the JavaScript macro looks like:

Screen Shot 2014-06-09 at 7.40.59 PM

Happy Measuring!

Questions or comments?  Get in touch with me on Google+ or leave a comment below.




Google Tag Manager in a multi-tenant environment

May 14, 2014

In many software-as-a-service (SaaS) companies, applications are multi-tenant.  This means you’ll have multiple clients sharing the same code base.  However, clients will often want their own Google Analytics profiles or even their own accounts.  To meet this need while also keeping things manageable in Google Tag Manager (GTM), you’ll want to store your clients’ Google [...]

Read the full article →

How to set a UserID as a custom variable using the Google Analytics cookie

March 15, 2014

I’m an active member of the LinkedIn Google Analytics group and a fellow group member, Ruth, recently asked how to set the unique Google Analytics user ID from the GA cookie as a custom variable.  I responded with the JavaScript code that would do this in classic Google Analytics.  Before long Ruth asked how to do [...]

Read the full article →

Using Google Tag Manager to log JavaScript errors in Google Analytics

March 13, 2014

As a developer, client-side errors can be a real pain.  Developers usually do a good job logging server-side application errors, but often times ignore client-side errors.  As the web evolves, we’re seeing more and more single page applications that are heavily reliant on client-side service calls using technologies like AJAX.  This makes sites heavily dependent on JavaScript. [...]

Read the full article →

What’s next for Google Analytics and Google Tag Manager? Q&A with Justin Cutroni from Google

February 19, 2014

Last night, I had the pleasure of attending our local Web Analytics Wednesday meeting (yes, I know, on a Tuesday) at ThoughtFaucet in Burlington, VT. As Vermonters working in the web analytics space, we’re fortunate to have Justin Cutroni, Analytics Evangelist for Google, right here in our backyard. The format for the meeting was open Q&A. [...]

Read the full article →

How to implement Google Tag Manager in the WordPress Thesis Theme

November 24, 2013

For those of you using the WordPress Thesis theme (as this site is), you may be wondering how to properly implement Google Tag Manager.  The built in Thesis option for scripts places scripts such as Google Analytics at the end of the page just before the closing </body> tag.  This is not an ideal location [...]

Read the full article →

About to make the jump to the DoubleClick version of the Google Analytics script? Read this first.

November 23, 2013

Update 2/18/2014: As it turns out the logic I used in my test below has an issue due to using setTimeout to test whether the user’s browser had loaded the GA script successfully.  Phil Pearce commented and suggested following Andre Scholten’s method which avoids the use of setTimeout.  I’m happy to report that follow up [...]

Read the full article →

Google Tag Manager for Single Page Applications

July 17, 2013

Single Page Applications are becoming more and more common as web developers adopt asynchronous technologies such as AJAX, Node.JS and Knockout. One of the challenges of adding a web analytics solution such as Google Analytics to a Single Page Application, is the browser location (site address) does not change as a user performs actions on [...]

Read the full article →