Skip to content
Elias Dabbas edited this page Feb 3, 2018 · 2 revisions

The package provides two main ways of creating ads:

  1. From scratch: basically writing the ad template, and inserting product names or any arbitrary text where it belongs.

Here is a tutorial on how the function works

  1. From a set of product names: In some cases, you have product names that contain features that work as ads. Or maybe you have product names, together with other text (maybe scraped from product pages), and you want to create ads from that. Sometimes, your page title is something straightforward like "Garden Furniture" and you can easily use it with the approach above. But sometimes your product name is something like this:
  • Pillow Covers 4 Pack Standard 20x26 Inches Pillow Cases Allergy Dust Mite Resistant White Protectors Premium 400 Style High Thread Count Cotton Sateen Set Zippered Hypoallergenic Soft Hotel Quality.
  • 2-Pack Premium Allergy Pillow Protectors. Dust Mite & Bed Bug Resistant 500 Thread Count 100% Cotton Zippered Pillow Covers. Tamara Collection By Great Bay Home Brand. (Standard)

In this case we can use a top down approach, where we start with the long text string, and try to split it and fit it in the respective ad slots, taking into consideration the limits imposed by the platform and the ad type. ad_from_string is the function that takes care of this.

It is flexible in the sense that it can work with any ad slot limits. For example, the default limits are (30, 30, 80, 15, 15), which are the character limits of Headline 1, Headline 2, Description, Path1, and Path2, which are used by Google AdWords and Bing Ads. In many cases, these platforms included, the limits are quite different, and this can easily be inserted into the function's parameter.

Clone this wiki locally