Freemarker Tutorial: Basics (Under Construction)

Freemarker Tutorial: Basics (Under Construction)

( Note: If you are looking for more Freemarker code please take a look here: Freemarker: Most common expressions )

In this tutorial we will go through the most basic steps of using Freemarker. Freemarker can seem a bit hard in the beginning but once you get a hang of the basics it's a quick way to master your campaigns.

Freemarker is used when you for example need to remove certain words from you product title or want to show the product price in your ads. The list of things you can do with Freemarker is endless.

 

The most common codes are just for showing titles or manufacturer in ads or keywords like this:

 

_artist.jpg

 

To show a parameter from your feed all you have to do is write for example:

$manufacturer


or if you want to show the price of the product in an ad:

$priceWithTax

 

If you want to clean your keywords or ads from certain words you use the replace code  In this example we want to replace all the words "here" with "for":

The code will loke like this:

${title?replace("here'","for")}

If you want to have more words replaced you can just put another replace code after it like this:

${title?replace("med","for")?replace("this'","that")}

 

 

 

Note: This is just a small tutorial to make you understand how Freemarker works and how to add expressions to your campaigns.

 

 

Feedback and Knowledge Base