simorgh icon indicating copy to clipboard operation
simorgh copied to clipboard

Test Chartbeat on Lite pages

Open amoore108 opened this issue 1 year ago • 0 comments

Overall changes

  • Initial implementation of adding Chartbeat on Lite pages, mainly to test that this approach works and sends data to Chartbeat.

Code changes

  • Adds checks for Lite mode and Chartbeat toggle, returning the Canonical Chartbeat component if true
  • Adds tests to check that the correct Helmet script tags are added to the page for Lite mode

Testing

  1. Visit http://localhost:7080/pidgin/articles/cj5l1958ljjo.lite?renderer_env=live
  2. Open the Network tab (may need to refresh the page to see all the transferred files)
  3. Confirm that chartbeat.js is downloaded
  4. Stay the page for awhile and observe 'ping' requests to Chartbeat
  5. Click on one of the 'ping' requests and check that values are present

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

amoore108 avatar Apr 30 '24 15:04 amoore108