Map array in server side Google tag manager

Sometimes you need to send to a third party service a different array structure than the one specified on Google Analytics 4 (GA4). So, in case you don’t want to create a new event only for this service and you want to reuse as much as posible a GA4 event like add_to_cart, then you need to map the GA4 built in array on GTM. This sounds pretty easy if you have used GTM (no server side) before, basically you create a new custom javascript variable and return the mapped array....

May 8, 2024 · 2 min · Elvin Guti

Show full branch name on powerlevel10k theme

powerlevel10k is a popular zsh theme and my favorite one. However, branch names are truncated if these are pretty long. Although, you can remove this limitation by updating its config file: vim ~/.p10k.zsh Search for the branch name and comment the line that’s doing the truncation: # Tip: To always show local branch name in full without truncation, delete the next line. # (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line You might need to restart zsh...

April 16, 2024 · 1 min · Elvin Guti

Untrack/Remove git files

If you accidentally committed files on git because you didn’t have a .gitignore file or you just updated it, you can untrack files with: git rm --cached <file> or if you have several files: git rm --cached `git ls-files -i -c --exclude-from=.gitignore`

April 15, 2024 · 1 min · Elvin Guti