question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

${pageLoadTime} variable is not resolved after default pageview trigger

See original GitHub issue

Short description of your issue:

${pageLoadTime} variable is not resolved after default pageview ("on": "visible") is triggered. It’s resolved later though.

Other similar variables (like ${contentLoadTime}) are resolved fine.

How do we reproduce the issue?

Check https://amp.mobify.net/lancome/http://www.lancome-usa.com/makeup

You’ll see that one of the requests to engagement-collector.mobify.net fails - it’s supposed to have ${pageLoadTime} defined.

Currently if I use this trigger:

"pageload": {
    "on": "timer",
    "timerSpec": {
        "interval": 5,
        "maxTimerLength": 600
    },
    "request": "pageload"
}

The first request has undefined ${pageLoadTime}, but only the first one. All consequent requests are fine. Originally I had this issue with another trigger (it’s deployed on the page mentioned above):

"pageload": {
    "on": "visible",
    "request": "pageload"
}

What browsers are affected?

Chrome 56

Which AMP version is affected?

1486153081489

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
luby1commented, Nov 26, 2018

Hi Avi, thank you for your reply. I’ve tried your suggestion, and no result.

I opened new issue: https://github.com/ampproject/amphtml/issues/19463 . Didn’t know how to copy you from the issue itself; I apologise if there is a better way to do it.

1reaction
lannkacommented, Feb 22, 2017

Agree, seems like working as intended. We can’t wait till the full page load to send the ping, otherwise you’ll lose many pings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved - Pageview Trigger Not Working In Google Tag Manager
The issue is visible when you open a GTM Preview and Debug mode and reload the page. A P&D console appears, but only...
Read more >
Page view triggers - Tag Manager Help - Google Support
Use Google Tag Manager's page view triggers to fire tags when pages are loaded in web browsers. There are five trigger types that...
Read more >
GTMtips: Use The All Pages Trigger Correctly - Simo Ahava
The All Pages trigger IS a Page View trigger with no other conditions, i.e. it fires on every single Page View event (event:...
Read more >
Measuring Page Load Time of single-page app with GA
As you have found, Google Analytics will not provide page timings for SPA's. This includes if you increase the site speed sample rate...
Read more >
Difference Between Page View and Dom Ready ... - YouTube
Difference Between page view and om ready and window loaded : Google Tag Manager TutorialHere are the contents of this video :00:00 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found