What is a tag?

In the marketing world tag (or pixel) is used for tracking purposes. Historically it was based on a call to retrieve a 1x1 transparent image. Rational behind this was to retrieve client side information of a site visitor on a 3rd party server. Information would include browser standard information including cookies. There’s a lot of things that can be done with this information from analytical and marketing point of view.

Why is is so Messy?

Tracking and conversion tags (pixels) were supposed to be “add-ons” that any non-technical web master (and later “business user”) should be able to drop into mark-up and be done. After a little bit information flows into tag vendor server and reports are available. But it is not as simple as it sounds when you need to work with multiple tag vendors. Imagine following scenarios.

Scenario 1:

We need to know how many unique visits we had to a page X.

Scenario 2:

We need to count how many times visitors clicked a button Y.

For scenario #1, traditionally it is achieved by adding a tag to the HTML. Something like

   1: <img src="http://vendor/tag.jpg?client=id&page=code" />

For scenario #2, again, traditionally it is as “simple” as embedding code into onclick event

   1: <button onclick="vendorTagFunction(params)" />

It’s almost good, except mixed concerns and need to constantly change. In the marketing world, tags come and go. And it happens frequently. And with multiple vendors. Therefore you end up with a few issues doubled (when tag is added and removed), multiplied by number of vendors.

  1. Constant need to modify mark-up
  2. Constant need to modify client side code (JavaScript handlers)
  3. Constant need to deploy changes
  4. Mixing of concerns (marketing vs. development)

What’s a Solution?

Separation of Concerns. Tags are not needed for markup and client side code. Developers and designers shouldn’t be concerned with those. Marketers should (well, ideally at least). In order to achieve that, tags should be placed and managed separately from markup and code. This is where Tag Management tools are handy.

A tool I have tried so far was Google Tag Manager (or just GTM) and it works great for these kind of things.

How Tag Management Helps?

These are a few things that GTM does for you:

  1. Takes tags code and markup out of your markup and code and by that makes it clean and lean
  2. Injects tags dynamically based on rules execution
  3. Allows to manage rules and tags outside of your main solution
  4. Versioning by marketers – a very strong feature
  5. Publishing* of a specific version
  6. Preview and debugging to ensure things work before get published
  7. Ability to add/remove tags w/o main site re-deployment
  8. and more…

* Publishing that is happening within GTM, no connection to your main markup/code publishing

How Simple it is?

Simple. There’s really not that much to it, but once you utilize the power, you’ll not go back again to embedding tags in markup/code ever again.

Another benefit is integration. If you use Google Analytics, you can easily integrate that one (another cross-cutting concern is removed from you markup).

Are there Alternatives?

Plenty. Google is not the pioneer in this area, and the tool is far from perfect. Lots of other companies have offerings that are good and viable solutions. We found GTM to be simple, clean, and cost effective (free for now) to address our requirements.

RavenDB is amazing. You don’t have to work with it for a long time to get that. What’s even more amazing is the extensibility and testability of it. This post is about the last two.

In my recent work I needed to have versioning of documents with very specific requirements that are not matching RavenDB built in versioning bundle. Default versioning bundle would generate revisions of all documents upon any change that occurs to a document. In my scenario, I needed only 1 revision at any given time, and revision should be generated only for the documents that have a Status field and its value is changing to “Published”. Very specific to the business requirement. After poking around, reading documentation, and bugging people on user group, I learned a few things about testing custom bundle/plugin RavenDB style.

Testing

If you are doing unit testing, RavenDB.Tests.Helpers is your friend. Once nuget package is installed, your tests can inherit from RavenTestBase class that will wire a new embedded document store for you, optimized for testing, and allowing additional modification needed for testing scenario(s) (#3). For bundle/plugin testing, I needed to register all of my triggers (optionally, you could register one at a time, or all of the triggers found in assembly) in Raven’s configuration. The base class exposes ModifyConfiguration for that purpose (#1). In addition to that, RavenDB needs to be told that we are activating our bundle (#4). Logging (#2) was more for me to see what happens with RavenDB while test is running.

image

Custom Triggers

One this that I haven’t seen in documentation, but was helped with at the user group was the attributes needed for each custom trigger. InheritedExport and ExportMetadata are both needed. BundleName is the name that is registered with Raven’s configuration.

image

Enabling Bundle in RavenDB

In order to get custom bundle to work, it has to be copied into Plugins folder under RavenDB location and database setting has to be updated to let Raven know we want bundle to be activated.

image

Bundle in Action

image

image

image

I have ran into an interesting message when opened a user group site in Visual Studio (not something that I usually do) and it made me wonder

1. What version of IE Visual Studio 2012 Update 2 CTP is using if not the one found on machine (IE9 on my Windows 7)

2. Google is playing dirty… this message would only show up in IE version 8 and lower.

Capture

RavenDB has a great way to monitor what’s happening between client and server. I found it very helpful when trying to figure out what’s happening, or just understand how things work (such as querying).

When doing unit testing, the pattern is to leverage in-memory store to speed things up. Unfortunately, when that’s the case, there’s exposed communication happening between unit tests (client) and in-memory store (server).

There are a few possible solutions folks have suggested, but one that really made my day was… custom logger. This is a fantastic way to tap into what’s happening and see it all (Thank you Matt Johnson for help).

Now there’s no more blindness and magic. Everything is revealed. Happiness.

If you are doing web development, then you have the headache of testing your web application on various browsers. What makes it even more “fun” is the fact that on a given OS you might run multiple browsers of various versions. What I have done in the past was targeting “standard” browsers. That was long time ago, and today reality is a little more challenging. Along with the desktop browsers, nowadays there are mobile browsers that are making things a bit more complex.

Typical solution would be to create VMs. But just a thought of managing all those VMs in a library of VMs, hardware/cloud investment to make it work… gives me chills. Luckily, there’s a service called browserstack that does it for you. And let me tell you that for the money they ask you get a LOT.

Windows XP/7/8, OSX Snow Leopard/Lion/Mountain Lion/iOS-*, Android-* – that’s just a short list of OSes supported by browserstack. But that’s not all. What makes it even better, are the Web Tunnel and Command Line options. So far I have tested only the first, which allows you to run an OS/browser you choose with the LOCAL web site under development. Yes, you are reading correctly, local version. I.e. you do NOT have to publish to a preview public site to make it work. Slick.

The second option, command like, is more for automated testing. I’m yet to try it, but it sounds promising and something tells me my team will love this option Smile

Year end is always an interesting time. Reminds a sort of retrospective, but that’s a geek in me that sees it that way. Yet what happened this year? A lot for me. Here’s a list of significant things for me:

  • Leading and managing people are two different things, combining both and having good results is not an easy task
  • Start-up experience, building from concept to a pilot
  • Windows Azure experience, lessons learned from Cloud Services with NServiceBus
  • Getting a little taste of Client Side “revolution” through knockout and backbone
  • Power of ASP.NET MVC WebAPI and SignalR
  • RavenDB (and document databases in general) awesomeness I wish I’d discover earlier
  • And last, but not least, learning more about humans and myself

This was a good year, packed with lots of learning and new things. The goal for 2013 is to keep it that way and exceed.

Happy new year to everyone!

One of our latest projects has failed to restore nuget packages on the build server. Error message was

Package restore is disabled by default. To give consent, open the Visual Studio Options dialog, click on Package Manager node and check 'Allow NuGet to download missing packages during build.' You can also give consent by setting the environment variable 'EnableNuGetPackageRestore' to 'true'.

I have looked into options, and was surprised that default way to handle it was

  • Go to your build server (rdp or physical)
  • Start Visual Studio

While this is acceptable for a local development, for a build server this is a big red light right there. Gladly, as pointed out in this blog post, there’s an option of setting a system variable to solve the issue.

Would be nice to see nuget default to system variable, and then fallback to an instance of VS on a server, but not the way around.

Quite amusing to read pros and cons of not having a start menu button in Windows 8. Debates from how great it is to how poor the decision was to remove it are all over the web.

I know people want to be able to navigate to their apps quickly through a single point. But for the love of simplicity, is THIS simple? Yes, I am talking about that monster hiding behind little cute as button button… Start Menu. Not only you had to click through multiple times, but also you had to master multiple cascading menus that where chaotically expanding all over the screen, unless you never installed applications and had it nice and tidy. Is this what people are complaining about? Hmmm, interesting.

For myself this was not even relevant. I have stopped using this “useful” button along with the spaghetti menu long time ago (from Windows XP) thanks to David (ex-co-worker) who has introduced me to Object Dock Plus. That got rid of the start button along with the unnecessary task bar (you may say I copied Mac – so it be, they also “borrowed” the idea from somewhere, good software development imagepractice). Next step – Executor. There are other alternatives, but I found this one the best. Wish only the creator would compile it in 64bit mode, but that’s a different post. So switching to Windows 8 is seamless – no need in button and menu at all.

Now why do I write this post? Probably because it’s my reaction to  those who wine and complaint about the fact that someone moved their cheese, ignoring the fact that the cheese was stinky old. Embrace the change, and if you don’t like it, then find alternative, but don’t complaint just because you think it’s not going to work.

And BTW, Windows 8 has brought my old hardware back to life. Something that only Linux could do before Winking smile

Update 2012-09-20: If you really miss the button, there’s a solution for you as well. It’s called VI Start for Windows 8

Update 20012-11-02: Another free alternative is Classic Start. Features list is quite impressing.

Update 2012-11-08: If you want Shutdown/Logoff/Restart tiles on your new start screen, there’s an easy PowerShell commands to get the job done.

Update 2012-11-26: So far the slickest implementation is Start8 by StarDock, which I like for Fences and ObjectDock.

Our group is moving to Git for code management and we were looking for in-house hosting option on Windows platform. I was surprised to find out that out of the box there are not many options. Rolling your own solution (aka setting it up manually) was not an option as we are a small group that is already tasked with enough work. So I started my search for free or paid options. You can guess that options were limited, yet one product I found has exceeded expectation and was just perfect – SCM-Manager. Easy, simple, smooth integration with Active Directory and Jenkins build server. What else a boy needs SmileNot to mention that it’s absolutely free. Amazing piece of work. Highly recommended.

image

Wow.

More Posts Next page »