One of the neat features of Google Tag Manager is the ability to fire a tag or some custom JavaScript to only a certain percentage of your users.  Why would you want to do this?   Let’s say you want to use a test app like Optimizely but don’t want to pay for one of the higher end packages due to the traffic volume on your site.  By only firing the Optimizely tag to a percentage of your users, you’ll save yourself some dough.  Another possible use case would be a survey pop-up to 5% of our users.

To sample our users with Google Tag Manager, we’ll need to add a new tag and then a rule that fires that tag a certain percentage of the time.  My steps below assume that you will be putting this tag into a test environment first and NOT straight to production.  You don’t want to have a JavaScript alert box popping up to 10% of your users on your revenue generating site.

Let’s get to it:

  1. Log into Google Tag Manager
  2. Select the test container you want to add the sampling tag to
  3. Click ‘New Tag’
  4. Enter a name such as ’10 percent alert’ for the tag
  5. Choose a tag type of ‘custom HTML tag’
  6. In the HTML box enter your custom JavaScript code: <script>alert(‘tag fired!’);</script>
  7. Click ‘ + Add Rule to Fire Tag’
  8. Choose ‘Create new rule’
  9. Enter a rule name of ’10 percent sample’
  10. Under ‘specify the conditions’, choose ‘New Macro’
  11. Enter a macro name of ‘Random Number’
  12. Change the Macro Type to ‘Random Number’
  13. Click Save
  14. Change the ‘contains’ box to ‘ends with’
  15. Enter ’9′ in the empty value box.  (This means any time the randomly generated number ends with a 9, the tag will fire.)
  16. Click ‘Save’ to close the rule dialog
  17. Click ‘Save’ to close the tag dialog
  18. If you have a version of your test container, you’ll need to publish a new container version and then publish it.  This pushes the newly added tag to the tag container.
  19. Test!  Go to a page with your tag container and refresh it a few times.  Eventually you’ll see the JavaScript alert that says ‘tag fired!’.

If you want to change the percentage, you just need to change the rule conditions in step 15 above (be sure to change the rule name as well).  For instance, if you want to sample 1% of your users, you would change the value ‘ends with’ to ’01′ which would only match when the random number ends with ’01′ (101, 1001, etc.).  It wouldn’t match when the random number ends with ’00′,’02′, ’99′, etc.

Connect with me on Google+

{ 0 comments }

My new dev machine

by Dan on September 16, 2012

I just sold my recently loaded Late 2011 15″ Macbook Pro and traded up (sideways, really) to an Asus Zenbook UX32-VD.  Why the Asus?  It’s a 13.3″ screen rocking 1920×1080 resolution with dedicated 1GB NVidia 620M video card.  That, and it’s 3.3 pounds.  It puts the Ultra in Ultrabook. It’s easily upgraded by removing the 12 T5 screws on the bottom. To remove the HDD, you’ll need to remove the battery which uses standard phillips screws (Thanks Asus!) Being an Ultrabook, 2GB of RAM is soldered onto the board leaving one DIMM slot for you to upgrade with up to an 8GB DDR3 1600 mhz chip. If you want to take a look inside, iFixit has a fantastic UX32VD teardown.

Here’s my setup:

ASUS Zenbook UX32VD-DB71 13.3-Inch Ultrabook

SAMSUNG 830 Series 2.5-Inch 256GB SATA III MLC Internal Solid State Drive (SSD) MZ-7PC256B/WW

Kingston ValueRAM 8GB 1600MHz DDR3 (PC3-12800) Non-ECC CL11 SODIMM Notebook Memory (KVR16S11/8)
(Note: if you decide to buy RAM for this machine, be sure it’s CL11. I learned the hard way when my CL10 dinged my desktop graphics score. Apparently the on chip Intel video doesn’t play well with CL10.)

{ 1 comment }

Google Analytics just announced a set of new social reports to help marketers identify the value of traffic from social media sites such as Facebook and Twitter. As marketers, when faced with “What’s the ROI for Social?”, we often answer with “it’s the intangibles” or “it can’t be measured”. Now, with the addition of the concept of an ‘assisted social conversion’, we can put a dollar amount to that indirect social conversion.


(via Capturing The Value Of Social Media Using Google Analytics)

{ 0 comments }

Acquisition Express – AdWords Communication Extension

February 25, 2012

Late last year, Google AdWords added another Ad Extension called the ‘Communication Extension’ to their growing list of ad extensions. The Communication Extension allows you, the AdWords advertiser, to include a simple email registration form right underneath your ad! As you can see above, because I was signed in with my Google Account when I [...]

Read the full article →

How to create multiple twitter accounts with one Gmail address

January 8, 2012

Twitter doesn’t allow multiple accounts on one email address… or do they? If you have Gmail, you can create additional twitter accounts by using aliases. To create an alias in Gmail, you simply add a plus sign (+) after your Gmail user name and add the alias before the @ symbol. For instance, if you [...]

Read the full article →

Word Formatting Infographic

January 6, 2012
Read the full article →

What does wearing hearing aids sound like?

January 5, 2012

I’ve worn hearing aids since I was four years old – 28+ years now. With the somewhat recent explosion in electronic gadgets, I’ve noticed an unfortunate side effect – increased hearing aid interference. This is especially the case with cell phones. To demonstrate my point, I’ve embedded my first recording: Galaxy Nexus CDMA Phonak Super [...]

Read the full article →

Fluorescent Light Bulb buzz with telecoil

January 5, 2012

This is what it sounds like when you walk too close to a fluorescent light bulb with your hearing aids on the T-switch (telecoil mode). Fluorescent Bulb Phonak Super-Front PP-C-4 Hearing Aid on Telecoil by danruss

Read the full article →

Telecoil sounds from a 2005 Acura TSX

January 5, 2012

This is what it sounds like when you start and run a 2005 Acura TSX while wearing hearing aids on telecoil mode. 2005 Acura TSX Phonak PP-C-4 Telecoil Starting by danruss

Read the full article →