Coding In Digital Marketing
Before I started coding, I thought it was the stuff of wizardry. Hooded beings in dark rooms tap tap tapping away and creating pure magic so it seemed. I wanted to be a wizard, nay, a Warlock! I took a leap and started out with a toe-dip in Python. If you’d like to have a crack at Python, this resource was instrumental in helping me progress all those years ago.
Sometime later I haven’t mastered the art of python, I’ve studied a certain area of it to benefit me but I’m far from the Warlock I wanted to be. But I now know how to do certain things that really come in handy when it comes to coding in digital marketing.
Do digital marketers use coding?
I can’t speak for every agency out there, but I definitely do.
We at Embryo have a Dev team and some of the stuff these guys create is absolutely astonishing (We’ve won awards based on their work before) In this evolving world, we’ve had to stay ahead of the times and learn things outside of the job description to be able to do some things to a high standard and other tasks we can automate to make time for focussing on our clients with laser-like efficiency.
Other than a development team, digital marketers do use coding, but not to the same degree. Many stick to spreadsheets and power queries but we at Embryo use coding to do more than spreadsheets…
How is coding used in marketing
I’ll go through some of the things I use coding in digital marketing for over the next few paragraphs. It’s not wizardry like I said earlier, it’s more like a process of trial and error and practice and through a bit of elbow grease I’ve grown my knowledge to be able to do some pretty cool stuff. Some that help a great deal, others are just for personal
Digital Marketers have a wealth of information to them and using Python can really help especially if I’m doing the same thing over and over again. Recently I found a gap in an API we were using and constructed a web scraper to help fill in those blanks that were being filled in manually. This in turn has led to the beginning of two other projects for me.
Our CIO James Welch has made some fine use of coding to create what is probably one of the finest internal tools I have ever seen. It’s almost like it’s alive, changing the strategies we use depending on certain circumstances which means that our clients are ALWAYS ahead of the game.
How Python uses coding in digital marketing problems
I’ve got a few examples of how Python can be used to solve some real-world marketing problems, it’s not the be-all and end all of how coding in digital marketing can help anyone with digital marketing.
One of the big ones that really started me on my coding journey. I used to spend ages just tweaking a single line graph to try and get it to just not look rubbish. The first-ever data visualisation I made was in Excel, I’m talking about the 1998 version…
Fast-forward a decade and a half and having never used Excel in that time since I found a Python library called Matplotlib, it was this subsection of Python that really got me on a roll. I even made a nice scatterplot video on Youtube.
I’m sure we can all agree that this graph is super exciting. If your data is already loaded then this image can be made in 4 lines of code ( Could technically be compacted to just: plt.plot(x, y) without labels and graph title.) Using a different library called seaborn and finetuning a couple of details you can make something that looks really good, especially if you’re coding in digital marketing for digital marketing.
Admittedly this image is far nicer to look at and didn’t need a lot of tweaking in order to make sure I had something tangible to work with. You can see the full EDA here.
Oh God, the arbitrary tasks that are ever repeating! These are the menial things that we loved doing at first but like Sam Welch’s description goes in his recent blog post:
I have played more MMORPG’s and JRPG’s than other genres, meaning I have a painfully good understanding of the concept of ‘Grinding’: The act of repeating the same task, over and over again, to reach a desired goal or outcome.
The same applies here, it’s basically grinding, and it gets boring. So why not use Python to automate all the stuff that takes ages and makes your eyes sting because you haven’t blinked in twenty minutes trying to get it finished as fast as possible?
Do a trade-off and spend a week perfecting a program that does everything for you so that all you need to do is double click and go get yourself a cuppa because you deserve it to feel smug.
On a personal note, I also created a web scraper that I run on a raspberry pi that automatically collects a free Bitcoin gift every 1 hour and 1-minute meaning I can collect 23 of these gifts every day. I’m sure you can understand the importance of not having to wake up every hour to accumulate during your well-deserved rest time.
The opportunities here are endless, if one were so inclined, you could theoretically automate most tasks you do on a daily basis. The only limitation is imagination!
Here at Embryo, we have a few spreadsheet geeks. I got in touch with our PPC Executive Umar Ditta and asked him about his spreadsheet knowledge for coding in digital marketing advice:
Before starting on my marketing career I had never really used spreadsheet programs. I knew they were useful but I always found them daunting.
So many formulas and weird functions. I was happy to just use it for basic calculations (=SUM() was my friend) but then I realised there were some real tangible benefits to using something like Excel and Google Sheets that helped me progress as a digital marketer.
Formulas reduced the chance of human error, templates can be created and fancy charts can be made fairly easily.This wasn’t done overnight, and in fact I’m always still learning, but the spreadsheet skills I picked up have really helped me appreciate the importance of understanding data science.
In fact, spreadsheets were my way back into coding. I picked up a few handy tips in excel and kept going, I found spreadsheet tests that employers would use to test their potential candidates and I was sailing through them. I then started automating huge amounts of data while working at Amazon using Microsoft Series’ newly promoted language VBA (Visual Basic Application).
Studying this I learnt how to use the dot notation and then access other properties etc and that led me back into Python where I dove headfirst into picking things up again.
I created a program GUI that accessed a spreadsheet and retrieved details massively reducing the time it took to get a bit of insight into who could do which tasks (the teams were 50-60 people strong) I owe a lot to learning VBA, its the first thing that opened my eyes to everything else.
HTML, CSS, D3
These three are my latest additions to the knowledge bank, still a work in progress but in order to show off some truly unique visuals I’m getting stuck into D3, unfortunately, the basis of understanding it lies in having a fundamental knowledge in HTML and CSS to make things easier.
While HTML isn’t strictly considered a programming language, code is required for it to work. Even though it’s in the name (Bit like a Jafa Cake) it doesn’t use logic in any way shape or form.
CSS has progressed to the point where you can calculate things and store variables but still only provides instructions on how to build a framework, so again not a true programming language.
Coding in CSS is actually quite fun, and really quite easy once you get to understand which pieces fit where. Nice little link onto how coding can help you out by providing transferrable skills.
What Else Is There?
Coding in digital marketing doesn’t need to be scary. It takes practice, patience and a bit of problem-solving to wrap your head around things. The technologies I’ve listed don’t have to be the ones you use. You always try C, C#, C+ too. The thing is once you’ve learned one to a pretty decent standard, other languages are much easier to adopt.
Python taught me about dictionaries which made coding in CSS even easier.
There’s no real roadmap to learning, pick one, learn it and see where you go. One piece of final advice would be not to stack languages as you’re learning. Just focus on one and learn what you need to to get the job done. Build some projects, make a GUI, and create a calculator. I’m sure you get the picture though.