simorgh
simorgh copied to clipboard
Test Chartbeat on Lite pages
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
- Visit http://localhost:7080/pidgin/articles/cj5l1958ljjo.lite?renderer_env=live
- Open the Network tab (may need to refresh the page to see all the transferred files)
- Confirm that
chartbeat.jsis downloaded - Stay the page for awhile and observe 'ping' requests to Chartbeat
- 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.