Coding for SEM – Reaching the next level

Published by Patrick Mebus on

Programming Languages like JavaScript or PHP are the backbone of the Internet as we know it. To know about the fundamental functions of code execution will tremendously increase your agility in Search Engine Marketing. Especially when it comes to Machine Learning and Artificial Intelligence.

Why learning code as a Search Engine Marketer?
  • Understand how website-tracking, tag-implementation and data-collection is done
  • Be able to automate reportings and recurring tasks. Save time!
  • Be able to make quick changes on your website and your content
  • Be able to connect your database with external APIs
  • Bring your SEO-HTML-skills on a new level
  • Be able to improve your website-pagespeed
  • Speak the language of your tech-team to speed up processes
  • Execute Machine Learning projects <3 

A lot of great salesman and marketers actually failed because they were not able to see the full potential of a technical innovation. You can change the game if you get a better understanding for „the other side“.

expand your possibilities in SEM - learn how to code

expand your possibilities in SEM – learn how to code

And there is another great reason to learn code. Something I discovered when I was learning Java Script, PHP and Python a couple of years ago. You’ll start to think like a programmer. No reason to be shocked. This is something truly amazing. By facing a problem a programmer shows a thinking pattern like this to find a solution

  1. Problem definition: what is the problem?
  2. Problem abstraction: Is there a solution? Is there only one solution? How can we define the object?
  3. Algorithm draft: strip down the problem into several subproblems, -solutions and -steps
  4. Proof of correctness: specification of impact of every sub-step
  5. Calculation of Effort
  6. Start to code

Amazing, isn’t it? Adapt this thinking process for every part of your work and your marketing will be a better one.

Useful programming- and script-languages for SEM

Python, Java-Script, HTML, Ruby on Rails, R. There are more than 700 programming languages out there. Getting into the world of programming often fails because of the abundance of possibilities. The crucial point is: what is your goal and the problem you’d like to solve? Which language can be the tool to make your life easier?

1. JavaScript

JavaScript is a client-side dynamic language. On websites ( 95% of all in the world!) it’s commonly used to make user interaction possible by reaching out to the users browser.
One of the biggest advantages of knowing JavaScript in Search Engine Advertising is the possibility to automate campaign execution in Google Ads and Bing Ads by writing execution-scripts.
By setting up rules that follow if/else conditions your campaigns can increase and decrease bids and budgets based on a campaigns, adgroups or keywords performance. Also quite powerful is the possibility to create alerts for almost everything and the automation of reportings.

JavaScript example: excerpt from Google Ads script

Java-Script example: excerpt from Google Ads script


The ‚Hypertext Markup Language‘ is not a programming language in the narrow sense. With HTML you can build (very) simple, static websites. It’s commonly used for structuring website content and basically gives you the power to fill your blank website with information.
Mostly important for digital marketing: HTML became more and more relevant for Search Engine Optimization since it allows you structure your data snippets for search engines like Google and Bing. Popular and SEO-relevant markups are the title-tag, the meta-description and the canonical-tag to mark duplicate content.

simple text declaration example for HTML


Responsive Webdesign. Have you heard about it? If you’d like to create an amazing user-experience across devices, CSS is one of your new best friends.  
CSS stands for ‚Cascading Style Sheets‘. As the name already describes, it’s the language that defines your Websites style. That includes colors, fonts, shapes, layouts for different devices and spacing.

It’s the tool you have to master to keep the user on your landingpage. An important cornerstone of website optimization and UX. CSS interacts with your HTML-code. It’s closely connected to HTML even if it’s stored in a separated file on your server.
By declaring individual elements, you can allocate CSS-style-attributes for anything visible on your site.

CSS example for style-element-declaration

3. PHP

While java Script does it’s work on client-side, PHP (Hypertext Pre-Processor) is a server-side-script language that sends requests to MySQL databases after the user took an action on your website. For example when a user fills out a form or types something into a search-field. To output a result PHP requests the required information from the database. What makes PHP so valuable is the ability to collect and receive data. Due to this PHP is essential when it comes to website-tracking and cookies.  

PHP execution example: Request to MySQL database

4. Python

Finally Python. Python is considered to be the number one programming language when it comes to data science and the rising star of programming languages in general. The main reason:  Python was build by heavily considering simplicity. As it says in the “Zen of Python” guiding principles: “simple is better than complex”. 

Python is commonly used for Machine Learning tasks. One of the reasons is it’s connection with most of the AI-libaries and frameworks like Scikit and Tensorflow use the language to execute their algorithms. On top Pythons advantage over other Machine Learning programming language among others is its huge huge user-community, what it makes a great recommendation for Machine-Learning newbies to start with learning Python.

Linear regression algorithm in Python

The great thing Python in Machine Learning is, that you don’t have to build every model or every algorithm from scratch. 
There a plenty of Python libraries where you can import the needed algorithms from. An overview about commonly used import commands for algorithms in Python you’ll find here:

The best online-resources to start with coding for SEM

HTML Turtorial:

Code academy:


W3schools Java Script Turtorial:

W3 Schools PHP Turtorial:

W3 Schools Python Turtorial:

Automate the boring stuff with Python:

Google Developers Training:

exited about this post? feel free to share

Patrick Mebus

I’m a Digital Marketer with deep passion for Search Engines, Automation and AI. I’m here to make Machine Learning more feasible for Search Engine Marketers.

1 Comment

Everything you need to launch your Machine Learning Rocket in SEM · April 17, 2019 at 1:40 pm

[…] the basic programming concepts and the rules of code execution is a key skill of Machine Learning (and in Search Engine Marketing in general). The good news for our Machine Learning ambitions: The most commonly used ML-programming language […]

Leave a Reply

Your email address will not be published. Required fields are marked *