reatlat/wp-campaign-url-builder

Options to enforce utm field naming consistency

ErinPo opened this issue · 3 comments

A key aspect of proper UTM link usage analysis is parameter naming consistency. Your plugin could help with this by providing options to automatically:

  1. discard all characters which are non-alphanumeric or hyphens or underscores
  2. convert all uppercase letters to lowercase
  3. convert spaces to underscores

@ErinPo

  1. discard all characters which are non-alphanumeric or hyphens or underscores

The UTM links its professional tool for marketers, and usually professionals know the rules and limitations, anyway good suggestion, for example we have to replace Spanish accents :)

  1. convert all uppercase letters to lowercase

Again, UTM tools for professionals :) Also why you think we can't use Caps characters?
Google Analytics correctly read it.

  1. convert spaces to underscores

By default I use urlencode( $url ) this transcode all spaces to + which also works correct with UTM tracking on GA.

Do you have any proof recommendation from Google Help about lowercase params?

Usually professionals know is a good one. Lots of non-tech people are in charge of websites now, including for interfacing with media agencies. They have little computers in their pockets like the rest of us. That does not mean they ever purchased an app. Enough said. Any kind of handholding software can do is a godsend.

Caps create a mess because different people will tend to capitalize different letters of the same words causing analytics software to count things separately which should be counted as the same. All caps are hard to read due to all letters being the same height. They are also interpreted as shouting and thus all lowercase creates the most consistency with the least headache.

I anyway didn't suggest to force any of these rules as defaults but to provide them as very sensible options.

Using underscores as spaces (and hyphens to separate semantically distinct pieces of information within the same utm field) facilitates the writing of regexp when writing filters on the analytics side.

@ErinPo this and many your great recommendation already fixed in dev branch, very soon will publish to public release ;)