Skip to content
  • There are no suggestions because the search field is empty.

RSS Feed Specifications

We are introducing a streamlined and more secure way for publishers to handle log reporting. This guide outlines the transition from the legacy "script-based" integration to the new "parameter-based" integration.


Overview of Changes

The new method replaces raw JavaScript snippets with a structured JSON format within the <nb:scripts> tag.

Key Benefits:

  • Easier Integration: You only need to provide specific IDs (e.g., GA4 GID or Comscore Client ID) rather than managing complex scripts.

  • Enhanced Security: By using parameters instead of raw code, we eliminate the risks associated with executing arbitrary scripts. The final reporting script is now securely generated by NewsBreak.

Transition Comparison

1. Legacy Method (Old Way)

Previously, publishers had to manually embed full JavaScript snippets for Google Analytics or Comscore:

HTML

<nb:scripts><![CDATA[<script type="text/javascript">
var _comscore = _comscore || [];
_comscore.push({ c1: "2", c2: "12345678", ... });
// ... script loading logic ...
</script>]]></nb:scripts>

2. New Recommended Method (New Way)

Now, you simply pass the required IDs in a JSON object. NewsBreak handles the rest of the implementation.


Integration Type

New Implementation Code

Google Analytics (GA4)


<nb:scripts> { "gid": "G-XXXXXXX" } </nb:scripts>

Comscore


<nb:scripts> { "comscore_client_id": "XXXXXXXX" } </nb:scripts>

Custom API Endpoint


<nb:scripts> { "api_endpoint": "https://example.com/log" } </nb:scripts>

Combined


<nb:scripts> { "gid": "G-XXX", "api_endpoint": "https://..." } </nb:scripts>



Implementation Steps

  1. Identify your IDs: Locate your Google Analytics gid or Comscore client_id.

  2. Update <nb:scripts>: Replace the CDATA/Script block with the relevant JSON parameters shown above.

  3. Real-time Logs (Optional): If you require real-time log access, ensure the api_endpoint parameter is included in your configuration.