CMS Integration

There are several ways to allow reporters to add a liveblog to articles. Each method has advantages and disadvantages.

  1. No CMS Integration - Copy/Paste Embed Code
  2. Simple CMS Integration - Create Tickaroo CMS Module
  3. Advanced CMS Integration - Create Liveblogs via API

No CMS Integration - Copy/Paste Embed Code

If your CMS allows for posting custom HTML (with script tags), strictly speaking it is not necessary to create a CMS integration at all. Reporters can simply generate an embed code for a liveblog in the Tickaroo Editor and paste it into the CMS.

Advantages:

  • No upfront development work is required

Drawbacks:

  • Inconvenient for reporters
  • There is a potential for user errors due to the handling of HTML code
  • No server side fetch or AMP integration is possible

Simple CMS Integration - Create Tickaroo CMS Module

This is the most popular integration technique!

Most Tickaroo customers create a simple CMS module to make it easier for reporters to add liveblogs to articles. The CMS module asks reporters to copy/paste the ID of the liveblog they want to integrate and inserts a predefined HTML code into the article. The liveblog ID is prominently displayed in their Tickaroo account and is therefore easy for reporters to find.

Advantages:

  • Convenient for reporters
  • Low potential for user errors
  • Server side fetch and AMP integration is possible

Drawbacks:

  • Some upfront development work is necessary

Implementation Resources

Please refer to the Liveblog Embed V4 Documentation (or if applicable the Liveblog Embed V3 Documentation) on how to construct a liveblog embed, do server side fetch or integrate a liveblog into an AMP page. Most of the time, only the liveblog ID in the HTML code must be inserted dynamically by the CMS, but any other option of the embed can be exposed to reporters via the CMS.

Advanced CMS Integration - Create Liveblogs via API

Using our API, it is possible to allow users to create a new liveblog directly from the CMS. After the liveblog has been created, the CMS must store two IDs of the liveblog: The local_id and the ticker_id. Using those IDs the CMS can link directly to the liveblog editor as well as construct the necessary HTML code to integrate the liveblog into the article.

Advantages:

  • Very convenient for reporters
  • No potential for user errors
  • Server side fetch and AMP integration is possible

Drawbacks:

  • Upfront development work is necessary

Implementation Resources

Implementation requires three distinct steps.

Step 1: Call the Tickaroo API to Create a Liveblog

To create a liveblog via API the minimum required information is:

  • Client ID: Provided by Tickaroo
  • Client Secret: Provided by Tickaroo
  • Organization ID: Provided by Tickaroo
  • Title: Either use the title of the article or let the reporter enter a title
  • Start Date/Time: Either use the article date, creation date or let the reporter enter a start date

With this information a POST request can be constructed to create a liveblog as follows (example using curl):

# replace CLIENT_ID, CLIENT_SECRET, and ORGANIZATION_ID with information provided by Tickaroo
# replace START_DATE_TIME with a unix timestamp in seconds sinds 1/1/1970 of the start date of the event, example: 1652792493
# replace TITLE with the title that should be displayed within the tickaroo reporter interface, example: "My great liveblog"

curl --request POST \
  --url 'https://www.tickaroo.com/api/v5/write/ticker/create.json?client_id=CLIENT_ID&client_secret=CLIENT_SECRET' \
  --header 'Content-Type: application/json' \
  --data '{  
    "_type": "Tik::Model::Game",
    "template_id": "news",
    "organization_id": "ORGANIZATION_ID",
    "meta_info": {  
      "_type": "Tik::Model::GameMetaInfo::TitleGameMetaInfo",
      "starts_at": START_DATE_TIME,
      "title": "TITLE"
    }
}'

If everything is in order the result of the call is a JSON document (abbreviated exmaple):

{
  "_type": "Tik::Model::Game",
  "meta_info": {  
      "_type": "Tik::Model::GameMetaInfo::TitleGameMetaInfo",
      "starts_at": START_DATE_TIME,
      "title": "TITLE"
  }
  "local_id": "LOCAL_ID", 
  "ticker_id": "TICKER_ID"
  ...
}

From the result the fields local_id and ticker_id must be stored, as they are needed in later steps.

For more information please refer to the following documents:

Using the stored local_id a direct link to the liveblog editor can be constructed as follows:

// Replace LOCAL_ID with the stored local_id
https://pro.tickaroo.com/editor-v2/LOCAL_ID

If the user is logged in, the editor will open with the correct liveblog, otherwise the user will be redirected and asked to log in.

Step 3: Integrate a Liveblog into an Article

Using the previously stored ticker_id as the liveblog ID, please refer to the Liveblog Embed V4 Documentation (or if applicable the Liveblog Embed V3 Documentation) on how to construct a liveblog embed, do server side fetch or integrate a liveblog into an AMP page. Most of the time, only the liveblog ID in the HTML code must be inserted dynamically by the CMS, but any other option of the embed can be exposed to reporters via the CMS.