About Campaign Feeds

Campaign Feeds allow you to automatically publish your campaigns without human intervention. This article explains how you can create and manage multiple campaign feeds in your account.

What Campaign Feeds can do for you

1. Dynamic display Campaign Feeds

If you want to dynamically populate your website with your campaigns or contests, you'll create a dynamic campaign feed. This type of feed is an inventory of your campaigns that meet a set of criteria. For instance

  • You might insert your feed into a specific page of your website that is dedicated to giveaways. It will keep your page updated with all new campaigns that meet the criteria! Please note there is a 15 min cache time. 
  • You might use the campaign language as a criterion and display a feed with all English campaigns on your English website, a feed with all Spanish campaigns on your Spanish website, etc.
  • You might create a feed for different categories (thematics) or brands easily and effectively. For instance, if you use Campaign Thematics, you might have an "automotive" thematic assigned to all your campaigns about cars. With Campaign Feeds, you will now be able to automatically publish those to your automotive website.

2. Set up a one-click feed plug-in

If you don't have one already, you'll need to develop your own CMS plug-in containing your Qualifio campaigns in the form of an automatically updated feed. This plug-in would enable you to add campaigns to your website in just one click. It would pull in content from your campaign feed, load the campaigns of the said feed, and then all you'd have to do is select which campaigns to include.

Tutorial: Building a campaign feed, step by step

You can create multiple campaign feeds to pull in campaigns meeting different criteria. For example, you could import campaigns for your sports website in one feed, and create another for your lifestyle campaigns.

Screenshot_2019-05-16_at_10.04.41.png

By default, your feed contains the following elements for each campaign included:

  • Publication channel Globally Unique Identifier (GUID): a string of 30+ characters, divided by four hyphens, specific per publication channel.
  • Website ID and name: identifier and name of the website on which the campaign is published.
  • Publication channel ID and type: identifier and type of publication channel of the campaign (iframe or "widget", minisite, mobile app).
  • Campaign ID, title and type: identifier, title and type of the campaign (e.g. is it a Guess the word game or a Battle format?)
  • Campaign schedule: publication dates and times.
  • Whether there are specific hours for the campaign to be available.
  • The code snippet for the JavaScript iframe.

However, the feed content can be set up to include custom content elements such as the questionnaire, the image from the Virality step, the campaign language or author, any integration snippet, etc.

Follow our instructions for creating your campaign feed:

  1. Open Publishing and click Campaign Feeds.
  2. Select Create a campaign feed, fill in the feed filters and details, then click Save feed.
  3. Select the link icon next to your campaign feed. A pop-up window opens.
  4. Copy your JSON or XML link.

Screenshot_2019-05-15_at_17.58.01.png

Campaign Feeds essentially automatically copy-paste tags. Here is an example of the payload you will get:

{"numberRows":3,"channels":[{"channelId":"AFA21444-C1DA-D833-32C0-FDB6D01BD893","website":{"id":6520,"name":"FAQ"},"channel":"WIDGET","id":611229,"campaign":{"campaignId":611228},"schedule":{"startDate":"2019-04-12T00:00:00.000Z","endDate":"2029-04-26T23:59:00.000Z","hourlyLimitation":false},"integration":{"javascript":"<div id=\"qualifio_insert_place_611229\" class=\"qualifio_iframe_wrapper\"></div>\n                  <script type=\"text/javascript\">\n                    (function(b,o,n,u,s){\n                      var a,t;a=b.createElement(u);\n                      a.async=1;a.src=s;t=b.getElementsByTagName(u)[0];\n                      t.parentNode.insertBefore(a,t);o[n]=o[n]||[]})\n                    (document,window,'_qual_async','script','//faq.qualifioapp.com/kit/qualp.2.min.js');\n                    _qual_async.push(['createIframe', 'qualifio_insert_place_611229', 'faq.qualifioapp.com',\n                    '20', 'AFA21444-C1DA-D833-32C0-FDB6D01BD893', '100%', '1200', '', '', '', 'max-width:810px;margin:0 auto;']);\n                  </script>","webview":"https://faq.qualifioapp.com/20/AFA21444-C1DA-D833-32C0-FDB6D01BD893/v1.cfm?id=AFA21444-C1DA-D833-32C0-FDB6D01BD893","html":"<iframe src=\"//faq.qualifioapp.com/20/AFA21444-C1DA-D833-32C0-FDB6D01BD893/v1.cfm?id=AFA21444-C1DA-D833-32C0-FDB6D01BD893\"\n    id=\"qualifio611229\" class=\"qualifio_iframe_tag\" width=\"100%\" height=\"1200\"\n    scrolling=\"auto\" frameborder=\"0\" hspace=\"0\" vspace=\"0\" style=\"overflow-x:hidden;max-width: 1200px;\">\n    "}},{"channelId":"B09713EC-AB83-1D1E-CCE5-117424DFC82B","website":{"id":6520,"name":"FAQ"},"channel":"WIDGET","id":611252,"campaign":{"campaignId":611251},"schedule":{"startDate":"2019-04-12T00:00:00.000Z","endDate":"2029-04-26T23:59:00.000Z","hourlyLimitation":false},"integration":{"javascript":"<div id=\"qualifio_insert_place_611252\" class=\"qualifio_iframe_wrapper\"></div>\n                  <script type=\"text/javascript\">\n                    (function(b,o,n,u,s){\n                      var a,t;a=b.createElement(u);\n                      a.async=1;a.src=s;t=b.getElementsByTagName(u)[0];\n                      t.parentNode.insertBefore(a,t);o[n]=o[n]||[]})\n                    (document,window,'_qual_async','script','//faq.qualifioapp.com/kit/qualp.2.min.js');\n                    _qual_async.push(['createIframe', 'qualifio_insert_place_611252', 'faq.qualifioapp.com',\n                    '20', 'B09713EC-AB83-1D1E-CCE5-117424DFC82B', '100%', '1200', '', '', '', 'max-width:810px;margin:0 auto;']);\n                  </script>","webview":"https://faq.qualifioapp.com/20/B09713EC-AB83-1D1E-CCE5-117424DFC82B/v1.cfm?id=B09713EC-AB83-1D1E-CCE5-117424DFC82B","html":"<iframe src=\"//faq.qualifioapp.com/20/B09713EC-AB83-1D1E-CCE5-117424DFC82B/v1.cfm?id=B09713EC-AB83-1D1E-CCE5-117424DFC82B\"\n    id=\"qualifio611252\" class=\"qualifio_iframe_tag\" width=\"100%\" height=\"1200\"\n    scrolling=\"auto\" frameborder=\"0\" hspace=\"0\" vspace=\"0\" style=\"overflow-x:hidden;max-width: 1200px;\">\n    "}},{"channelId":"B13020C1-FC28-6113-4844-975843D8C953","website":{"id":6520,"name":"FAQ"},"channel":"WIDGET","id":611268,"campaign":{"campaignId":611267},"schedule":{"startDate":"2019-04-12T00:00:00.000Z","endDate":"2029-04-26T23:59:00.000Z","hourlyLimitation":false},"integration":{"javascript":"<div id=\"qualifio_insert_place_611268\" class=\"qualifio_iframe_wrapper\"></div>\n                  <script type=\"text/javascript\">\n                    (function(b,o,n,u,s){\n                      var a,t;a=b.createElement(u);\n                      a.async=1;a.src=s;t=b.getElementsByTagName(u)[0];\n                      t.parentNode.insertBefore(a,t);o[n]=o[n]||[]})\n                    (document,window,'_qual_async','script','//faq.qualifioapp.com/kit/qualp.2.min.js');\n                    _qual_async.push(['createIframe', 'qualifio_insert_place_611268', 'faq.qualifioapp.com',\n                    '20', 'B13020C1-FC28-6113-4844-975843D8C953', '100%', '1200', '', '', '', 'max-width:810px;margin:0 auto;']);\n                  </script>","webview":"https://faq.qualifioapp.com/20/B13020C1-FC28-6113-4844-975843D8C953/v1.cfm?id=B13020C1-FC28-6113-4844-975843D8C953","html":"<iframe src=\"//faq.qualifioapp.com/20/B13020C1-FC28-6113-4844-975843D8C953/v1.cfm?id=B13020C1-FC28-6113-4844-975843D8C953\"\n    id=\"qualifio611268\" class=\"qualifio_iframe_tag\" width=\"100%\" height=\"1200\"\n    scrolling=\"auto\" frameborder=\"0\" hspace=\"0\" vspace=\"0\" style=\"overflow-x:hidden;max-width: 1200px;\">\n    "}}]}

How to get the next 100 campaigns?

Some feeds can return thousands of campaigns. We obviously can't return all of them at once, so we need to return them one page of 100 campaigns at a time. But let's say you want to get to the next page with the next 100 campaigns... There is a way! Below, we provide you with a method for getting to the next pages.

  • Retrieve the ID of the last campaign returned on the current page.
  • Use the &cursor=campaignId parameter to request the next 100 campaigns.

You can think of the ID of the last campaign on the page as a sort of marker in the feed that says "you left off here". Replacing campaignId with this ID will allow you to paginate forward.

For example, imagine that your JSON is as follows:

https://api.qualif.io/v1/campaignfeed/channels/d882c3f1-1b05-48c8-bc1d-c11a45e2c23a/json?clientId=1234

Further, imagine that the campaign ID 123456 is the last one on the page.

Then, for example, you could call the subsequent page by adding &cursor=123456 to the URL:

https://api.qualif.io/v1/campaignfeed/channels/d882c3f1-1b05-48c8-bc1d-c11a45e2c23a/json?clientId=1234&cursor=123456

The response would contain the next 100 campaigns.

Change the default order of campaigns

By default, campaigns in the feed are ordered in ascending order by their launch date (oldest to newest). There is however a workaround.

If you want to override this order, you must add a channelOrder attribute to your URL. The procedure is similar to that described above for getting the 100 next results.

To sort the campaigns in descending order (newest to oldest), use &channelOrder=DESC:

https://api.qualif.io/v1/campaignfeed/channels/3819aeb6-dc76-4e37-a576-1b87255f2f34/json?clientId=1234&channelOrder=DESC

You'll end up with the latest campaigns showing first.

Was this article helpful?

Can’t find the answer you need?

Send us a question and connect with an expert to get personal assistance.

Contact support

Vous ne trouvez pas les réponses que vous cherchez ?

Nous sommes là pour vous aider. Envoyez-nous une demande en direct !

Contacter le support
helpcenter experts