Get more productive with lander snippets

Why you should be using lander snippets

Today we would like to tell you what landers snippets are, how to use them and how they will help you.


In programming, there is such a principle called DRY - Don't Repeat Yourself. In a general sense, this means that if you have a constantly repeating piece of code that you use in a large number of landers, it is more expedient to create a short and clear snippet. This allows you to easily insert it into the landers, instead of rewriting it each time you need it.


The violation of the DRY principle is called WET - which stands for Write Everything Twice or We Enjoy Typing. If you still like to rewrite the same thing over and over again, well, this message is not for you.

How will this be useful for you?

It's very simple, you’ll save a lot of time creating your own landers from prefabricated parts, instead of starting from scratch every time.

Moreover, when you use snippets, Zeustrak renders pages much faster.


Why? Because Zeustrak knows what code should be rendered beforehand!


As a result, the delivery of your content to the user is accelerated, which undoubtedly has a positive effect on the conversion.

Examples of lander snippets you can use right now that work like a charm

It's no secret that those affiliate marketers that work with Facebook constantly use pixel code. Zeustrak already has a traffic source named Facebook with all necessary elements for your setup.


Let us show you how to do it with a pretty GIF animation:

Now all you have to do is create a snippet with the placeholder named fbpixel. Go to LandersLander Snippets and click on the New Snippet button.

In the Placeholder field type fbpixel and then copy and paste the following code:

<script> var _fbpixel = '{lander.param:fbpixel}'; if (_fbpixel) { !function(f,b,e,v,n,t,s) { if(f.fbq)return;n=f.fbq=function() { n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments) } ;if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init', _fbpixel); fbq('track',"PageView"); } else { var fbq = function(){}; } </script> <noscript> <img height="1"style="display:none"src="https://www.facebook.com/tr?id={lander.param:fbpixel}&ev=PageView&noscript=1"/> </noscript>

Finally, click the Create & Close button. Voila! You have created your first snippet for the Facebook pixel!


Now every time you select Facebook as a traffic source in your campaign, you will have an additional field called Lander Parameters, where you’ll need to paste your Facebook pixel ID.

Also, this field allows you to use as many different pixel IDs as you want without changing any code when creating new campaigns.

The only thing you need to do then is just use the {snippet:fbpixel} placeholder within your lander code every time you need a FB pixel in it.


Great, right?

This is the most simple and common example of using snippets. You can also stuff the snippets with really big chunks of code.

Bonus! Zeustrak multilevel snippets

Let's go into snippeting even further. You might be thinking; well, I can create some snippets for myself, thereby speeding up and simplifying the creation of landers, but can I speed up the creation of snippets by using other snippets? Sounds crazy but the answer is yes, you can! 

Zeustrak recognizes snippets inside snippets up to 10 levels of nesting!