\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Tom Marianczak (dmpg\_tom)} \pdfinfo{ /Title (google-universal-analytics-url-collect-parameters.pdf) /Creator (Cheatography) /Author (Tom Marianczak (dmpg\_tom)) /Subject (Google Universal Analytics URL Collect Parameters Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{54A318} \definecolor{LightBackground}{HTML}{F4F9F0} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Google Universal Analytics URL Collect Parameters Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Tom Marianczak (dmpg\_tom)} via \textcolor{DarkBackground}{\uline{cheatography.com/18888/cs/2003/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Tom Marianczak (dmpg\_tom) \\ \uline{cheatography.com/dmpg-tom} \\ \uline{\seqsplit{www}.dmpgteam.com} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 2nd May, 2014.\\ Updated 9th May, 2022.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{p{0.4577 cm} x{3.6616 cm} p{0.4577 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Main Parameters}} \tn % Row 0 \SetRowColor{LightBackground} a & Random number used to link Google Analytics to Adsense (currently not working) & \# \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} cid & Client ID number & * \tn % Row Count 4 (+ 1) % Row 2 \SetRowColor{LightBackground} de & Document Encoding type & \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} dl & The Document Location & \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} dt & Document Title & \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} fl & FLash version & \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} je & Java Enabled? (1=yes, 0=no) & \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} ni & Non-Interaction hit type (set as true or '1' in code. Shows as 1 or 0 in parameters) & \tn % Row Count 12 (+ 3) % Row 8 \SetRowColor{LightBackground} \_s & hit Sequence - increments each time an event (inc pageview) & \tn % Row Count 14 (+ 2) % Row 9 \SetRowColor{white} sd & Screen Depth & \tn % Row Count 15 (+ 1) % Row 10 \SetRowColor{LightBackground} sr & Screen Resolution & \tn % Row Count 16 (+ 1) % Row 11 \SetRowColor{white} t & the Type of tracking call this is (e.g. pageview, event) & * \tn % Row Count 18 (+ 2) % Row 12 \SetRowColor{LightBackground} tid & Tracking ID (your UA number) & * \tn % Row Count 19 (+ 1) % Row 13 \SetRowColor{white} \_u & Verification code generated by GA analytics.js & + \tn % Row Count 21 (+ 2) % Row 14 \SetRowColor{LightBackground} ul & User Language code & \tn % Row Count 22 (+ 1) % Row 15 \SetRowColor{white} \_v & SDK Version number & \tn % Row Count 23 (+ 1) % Row 16 \SetRowColor{LightBackground} v & protocol Version & * \tn % Row Count 24 (+ 1) % Row 17 \SetRowColor{white} vp & View Port size (browser window visible area) & \tn % Row Count 26 (+ 2) % Row 18 \SetRowColor{LightBackground} z & cache buster & \tn % Row Count 27 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{5.377cm}}{\# equivalent of the classic analytics utmhid parameter \newline * must be present on EVERY call to be accepted by GA servers. \newline + see \seqsplit{http://stackoverflow.com/questions/26849042/u-parameter-in-universal-google-analytics-collect-hits} for full explanation} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.64701 cm} x{4.32999 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Override Parameters}} \tn % Row 0 \SetRowColor{LightBackground} dh & Document Host name override \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} dp & Document Path - used when overriding the standard page name \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} ua & User Agent override \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} uip & User IP override \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} cd & sCreen name - mainly used in app tracking \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{linkid} & Link ID of a clicked DOM element \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.64701 cm} x{4.32999 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Events Parameters}} \tn % Row 0 \SetRowColor{LightBackground} ea & Event Action \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ec & Event Category \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} el & Event Label \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} ev & Event Value \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{You will only see any of these when t (type) = event} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Custom Parameters}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{cd1...cdN} & Custom Dimension value with index number (free=1 to 20, premium=1 to 200) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \seqsplit{cm1...cmN} & Custom Metric value with index number (free=1 to 20, premium=1 to 200) \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} \seqsplit{cg1...cgN} & Content Grouping value with index number (1 to 5) \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.94563 cm} x{4.03137 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Campaign Variable Parameters}} \tn % Row 0 \SetRowColor{LightBackground} cn & Campaign Name \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} cs & Campaign Source \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} cm & Campaign Medium \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} ck & Campaign Keyword \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} cc & Campaign Content \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} ci & Campaign Id \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} glcid & Google adwords ID \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} dclid & google Display ads ID \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{To register any campaign variables (c*) you MUST populate Campaign Source AND Campaign Medium as a minimum.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Timing Parameters}} \tn % Row 0 \SetRowColor{LightBackground} utc & User Timing Catergory (not universal coordinated time) \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} utv & User Timing Variable name \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} utt & User Timing Time \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} utl & User Timing Label \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} plt & Page Load Time \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} dns & DNS time \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} pdt & Page Download Time \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} rrt & Redirect Response Time \tn % Row Count 9 (+ 1) % Row 8 \SetRowColor{LightBackground} tcp & TCP connect time \tn % Row Count 10 (+ 1) % Row 9 \SetRowColor{white} srt & Server Response Time \tn % Row Count 11 (+ 1) % Row 10 \SetRowColor{LightBackground} exd & EXception Description \tn % Row Count 12 (+ 1) % Row 11 \SetRowColor{white} exf & is EXception Fatal? \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Google UA is closing. Are you GA4 Ready?}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Did you know that as of July 2023, {\bf{Universal Analytics will stop collecting and processing data}}. To continue using GA you'll need to migrate to GA4. This is a complete change in architecture of implementation and data analysis. \newline % Row Count 5 (+ 5) DMPG can help you migrate to GA4 and \{\{link="https://dmpgteam.com/ga4-migration/"\}\}{\bf{we offer a free audit of your existing GA implementation along with migration recommendations}}\{\{/link\}\}.% Row Count 9 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{eCommerce Parameters}} \tn % Row 0 \SetRowColor{LightBackground} cu & CUrrency that the transaction takes place in \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} in & Item Name \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} ic & Item Code (sku) \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} ip & Item Price (per unit) \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} iq & Item Quantity \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} iv & Item Variation (normally category) \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} ta & Transaction Affiliation \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} ti & Transaction Identification number \tn % Row Count 9 (+ 1) % Row 8 \SetRowColor{LightBackground} tr & Transaction Revenue value \tn % Row Count 10 (+ 1) % Row 9 \SetRowColor{white} ts & Transaction Shipping value \tn % Row Count 11 (+ 1) % Row 10 \SetRowColor{LightBackground} tt & Transaction Tax value \tn % Row Count 12 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{You will only see these when t (Type) = transaction or item.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.69678 cm} x{4.28022 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{App Tracking Parameters}} \tn % Row 0 \SetRowColor{LightBackground} aid & Application ID \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} aiid & Application Installer ID \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} an & Application Name \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} av & Application Version \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} ht & HiT sequence number \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Other Parameters}} \tn % Row 0 \SetRowColor{LightBackground} aip & Anonymize IP (see note below) \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} jid & JoinID (binding your GA cookie to DoubleClick cookie) \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} qt & Queue Time (for collecting offline data) \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} sc & Session Control \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} uid & User ID (known uid as opposed to cid) \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{aip: The value of this parameter can be absolutely anything to cause the IP to be anonymized. This includes a blank value. \$aip=, \$aip=0, \&aip=1 will all cause anonymity.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Google Experiments Parameters}} \tn % Row 0 \SetRowColor{LightBackground} xid & Experiment ID \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} xvar & Experiment VARiant \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Social Tracking Parameters}} \tn % Row 0 \SetRowColor{LightBackground} sn & Social Network \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} sa & Social Action \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} st & Social action Targt (normally a url) \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}