What is an External Page Id?

In order to ensure comments remain connected to an article we recommend that you implement a Page-id. This is a unique identifier for each article that gets passed to the Insticator commenting code. More on this later.

How does Insticator tie comments to an article?

The comments themselves are controlled via Insticator’s commenting app, while the site itself is controlled by the Publisher. In order to marry comments to an article we capture the page URL (in the web browser address bar) and use that as an identifier. When an article loads on the site, we call the appropriate comments thread based on that stored page URL.

What happens if the page URL changes?

Any time the article page URL changes it can cause a disconnect between the article and the historical comments tied to it. This is because the system is using that page URL as the identifier for the comments that should be associated with it. This change can trigger a loss of comments on that article.

Reasons why URLs can change:

  1. Fixing a typo in the page URL resulting in character changes
    (i.e. from news/neqstory to news/newstory)
  2. SEO optimization of the page URL resulting in different wording
    (i.e. from news/newstory to news/moreuniquenewstorytitle)
  3. Site navigational or categorization changes resulting in different folder paths in the page URL
    (i.e. from news/moreuniquenewstorytitle to news/category/moreuniquenewstorytitle)
  4. Archiving articles resulting in path changes in the page URL
    (i.e. from news/category/moreuniquenewstorytitle to archive/news/category/moreuniquenewstorytitle)

🚧

Issues arising from URL changes

Historical comments associated with an article may disappear leaving no comments on a thread

Are there any measures we can take to avoid these issues?

Yes. We institute a few technical fallbacks to minimize the likelihood of this impacting articles comments. Publishers need the ability to modify their page URLs, and Insticator can never really know when these changes will occur, so under-the-hood, we look for additional tags in the code, mainly canonical tags and meta tags, which are less likely to change than the page URL.

Great! So that’s it then, right?

Actually, there is still a possibility that the website does not have these tags or that they change or get removed. To fully ensure comments remain tied to their articles we recommend implementing a Page-ID.


What is Page-ID?

A Page-ID is a set of characters that form a unique identifier. Each article on the site should have a unique Page-ID. This unique id is passed to the Insticator Commenting Unit and our system associates the comments on the page with that specific article. As long as this ID never changes, the comments will always load correctly for that article.

Is Page-ID required?

Technically, you do not need Page-ID for the comments to work properly. It is, however, recommended. It’s the most fool-proof way to ensure comments always load correctly for an article.

How is Page-ID implemented?

More than likely a Content Management System (CMS) is being utilized to create and manage articles on the site. Get the unique ID, generated by the CMS for each article, and pass it to the Insticator Commenting tag via a data-attribute. Each CMS is different. If the CMS does not have an article ID, or doesn’t provide a function to access it, you may need to generate your own.

Instructions:

In the Insticator Commenting tag, which should be integrated in the HTML position or slot you want the comments to display in, find the data attribute data-ext-page-id. Now find the dummy placeholder text of {extPageId} (it should be between two quotation marks). Replace it with the variable or function that embeds the unique Page-ID.

📘

For example, in WordPress:

Within the Insticator Commenting Tag find:

data-ext-page-id="{extPageId}"

and replace it with:

data-ext-page-id="<?php echo esc_attr(get_the_ID()); ?>"

This example uses an out-of-the-box function that WordPress offers to get the unique ID of a post or article. Other Content Management Systems (CMS) may vary.

What format should Page-ID follow?

Please ensure the unique ID is passed to Insticator in the following standardized format:

  • Aligns with the URL slug (an-article-title) or article ID (14325)
  • Ideally between 8 and 15 characters (max 100 characters). Keeping the page id shorter helps with data indexing and keeping page load times down.
  • Uses a combination of letters, number, hyphens (-), or underbars (_)
  • Does not include special characters other than the following :.$~

What if Page-ID is implemented incorrectly?

If Page-ID does not get implemented correctly there a few different tell-tale signs you can look out for.

🚧

Warning Signs

  1. No Comments Loading
    1. You may have incorrectly formatted the Page-ID or you may have duplicated the ID on multiple pages
  2. Aggregated Comments Showing on an Article
    1. If you see comments from many different articles on a single article, then most likely your Page-ID is not unique, and is being shared by many articles

Any other important Page-ID callouts?

❗️

Mobile Web

If you have different URLs for mobile variations of the articles they should have the same Page-IDs as their desktop counter parts. This ensure article comments are the same for desktop and mobile devices.

If the desktop and mobile variations don't have the same Page-ID, they will be treated by the system as two separate articles, which will result in different comments appearing for the desktop and mobile versions of the same article.