Skip to content

tirsky/vogon

 
 

Repository files navigation

Vogon: scalable customization of video campaigns

Vogon combines a video creative, a data table and a layout specification, generating a copy of the video creative combined with each line of the data table according to the layout specification.

The data can contain text and images. The specification determines the timing, position and font definitions for each piece of text and image, referencing data fields through their names. Fixed text can also be used in the layout specification.

The generated videos are (optionally) uploaded to a Youtube channel, and a campaign specification file is generated to be imported in AdWords for Video, creating geo-targeted campaigns for each of the videos.

This is not an official Google product.

Dependencies

In order to run Vogon, you need to have the following installed first:

Preparation

Vogon can upload videos to Youtube using the Youtube API and help you create AdWords for Video campaigns. In order to do that, you need to complete the steps below.

  1. Create a project in the Google Developers Console
  2. In the Console, create a new project with the "Create Project" button
  3. Click "Enable an API" and activate the "Youtube Data V3" API
  4. In "APIs and Auth -> Credentials", create a new Client ID for a installed application
  5. Download the JSON file with the "Download JSON" button, and save it in the directory where you will run Vogon (together with your configuration, data and image files). This file MUST be renamed to client_secrets.json to work.
  6. The account that manages the Youtube channel and the AdWords account must both have Edit access to the project, which can be configured in the "Permissions" section of the Console
  7. The Youtube and AdWords accounts must be linked - see instructions

Configuration

Vogon configuration files are JSON documents. Two samples are included with the source, a version for Unix-like systems and another for Windows. You can use one of these as a starting point for your project.

####Variables

In most values, you can use variables to insert values from the input CSV. For example, you can use the location name from the CSV to specify the geo-targeting for the campaigns.

The syntax for variables is {{column name}}, where "column name" is the name in the CSV header. For example, if your CSV looks like this:

City Price
São Paulo 48.900,00
Curitiba 49.900,00

You can configure geo-targeting like this:

"Location": "{{city}}"

Column names are case-insensitive (e.g. "City" and "city" both work).

Vogon pre-defines some special variables that don't come from the CSV:

{{$id}}: a sequential line number of the record in the CSV file (starting at 1, after the header). It can be useful to generate video files with unique names, for example.

{{$video_id}}: After a video is uploaded to YouTube, this is the video ID. It can be used for linking to the video. The "Video Id" ad attribute in the output CSV is automatically set to this value.

Importing the Campaigns

Vogon will generate a CSV file that can be imported into AdWords for Video, containing all the new campaigns, ads and targeting for the generated videos. This file can be modified with a text editor or spreadsheet application (like LibreOffice or Excel), if necessary, or imported as is.

If you want to insert ads into existing campaigns, you'll need to obtain the campaign ID. To do that, click the "Bulk Upload" button, choose the "Only Data" option and click "Download". The generated file will contain the campaign ID numbers.

Reference

AdWords for Video bulk upload documentation: https://support.google.com/youtube/answer/3344649

Location Codes

Location names need to be followed by their codes, which can be looked up in this page: https://developers.google.com/adwords/api/docs/appendix/geotargeting. The prefix "47-" needs to be added to the code that you look up from the page.

For example:

São Paulo, Brazil  (47-20106)
Florianopolis, SC, Brazil (47-1001706)

If the codes are present, the names are not really important, as the system will use the code to look up the location. If the code is absent, the system will try to find the location by name, but this is unreliable and can lead to missing or incorrect locations.

Using the Config Editor (edit_config.py)

It is possible to edit your .json configuration file using a web-based Config Editor. To do so, use this command in your project:

python edit_config.py sample_project/sample.json

This will automatically open your web browser, where you can configure:

  • Output file
  • Video title
  • Video description
  • Data file
  • Path for the FFMPEG application
  • Images (that you can add, edit or remove)
  • Text lines (that you can add, edit or remove)

Then you can PREVIEW or SAVE your changes. All the modification will then be saved to your .json configuration file.

To stop the Config Editor, on your terminal just hit CTRL + C

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 72.4%
  • HTML 22.5%
  • JavaScript 5.1%