Matomo心跳-准确记录每个网页的有效访问时长

默认情况下,当用户开始访问一个页面的时候,Matomo假设用户花费了0秒钟在网站上。随后:

  • 当用户总共只访问了一个页面,那么访问时长就会被设置为0秒
  • 当访客访问了不止一个页面时,最后一个网页的访问时长也会被设置成0秒。

下面介绍一种方法可以相对准确地记录访客花在最后一个页面访问上的时间。请添加javascript代码


// accurately measure the time spent on the last pageview of a visit
_paq.push(['enableHeartBeatTimer']);

这样,当访客有效访问一个页面的时候(包括页签被激活,被聚焦),Matomo就会将实际访问的时间发送给服务器。这些心跳请求不会追踪额外的操作和页面浏览。默认情况下,Matomo每隔15秒钟会发送一次心跳消息。你可以修改这个默认间隔,如设置为30秒。代码如下

// accurately measure time spent on the last pageview
// set the default heart beat interval to 30 seconds
_paq.push(['enableHeartBeatTimer', 30]);

备注:当测试心跳定时器的时候,请记住必须确保浏览器的页签是在焦点上。

《Matomo心跳-准确记录每个网页的有效访问时长》有3,730条评论

  1. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  2. https://myforexcashback.com/forex rebate, forex cashback serves as an effective instrument intended to refund part of transaction expenses that traders normally pay to brokers. This model helps reduce overall trading expenses, making each trade more cost-efficient, especially for those working with high volumes. Such cashback is usually delivered without additional actions on a daily or weekly basis, ensuring a consistent monetary return. By using forex cashback services, traders can improve their ROI without altering their existing trading approach. The key factor is choosing a trustworthy service, attaching the account and following the standard routine. Numerous brokers work with rebate platforms, letting traders stay with the platform they prefer while still receiving substantial rebate payouts. Cashback structures support transparency, as traders can track every refunded amount, making budget management more predictable. An added benefit is accumulation of rebates even with smaller trade frequency, creating a passive addition to the trading balance. Since cashback works independently of strategy, traders of all skill levels can utilize it effectively. High-frequency traders may generate sizeable monthly returns, further improving the long-term sustainability of their trading approach. Within the dynamic forex landscape, each decrease in trading expense is valuable, and cashback programs stand out as one of the most accessible ways to optimize expenses. Working with a credible cashback platform ensures transparent conditions, timely payments, and steady benefits, making forex cashback an essential component of a modern trading setup.

  3. https://myforexcashback.com/forex cashback, forex rebate serves as an effective instrument designed to return part of the trading costs that traders normally pay to brokers. This model helps reduce overall trading expenses, making each trade more cost-efficient, especially for those working with high volumes. The rebate is typically issued automatically either per trade or by period, providing a predictable financial benefit. Through participating in forex rebate programs, traders can improve their ROI without altering their existing trading approach. The key factor is choosing a trustworthy service, attaching the account and following the standard routine. Numerous brokers work with rebate platforms, letting traders stay with the platform they prefer while still receiving substantial rebate payouts. Cashback structures support transparency, as traders can track every refunded amount, making budget management more predictable. Another advantage is that rebates accumulate even during minor market activity, creating a passive addition to the trading balance. Since cashback works independently of strategy, it suits both novice and experienced traders. High-frequency traders may generate sizeable monthly returns, enhancing stability and growth potential over time. In the competitive forex environment, any reduction in commissions becomes meaningful, and cashback programs stand out as one of the most accessible ways to optimize expenses. Working with a credible cashback platform guarantees clear terms, punctual credits, and consistent advantages, making forex cashback an essential component of a modern trading setup.

  4. https://myforexcashback.com/forex cashback, forex rebate serves as an effective instrument designed to return part of the trading costs commonly deducted by broker platforms. This approach minimizes cumulative trading costs, making each trade more cost-efficient, which is extremely beneficial for active traders. Rebates are generally credited automatically per executed transaction or for a set timeframe, ensuring a consistent monetary return. With the adoption of reliable cashback solutions, market participants can enhance their investment efficiency without altering their existing trading approach. The key factor is choosing a trustworthy service, linking the trading account, and continuing to trade as usual. A wide range of brokers support cashback partnerships, allowing traders to maintain their preferred platform while still receiving substantial rebate payouts. Forex rebates likewise offer clarity, allowing users to monitor each refunded value, helping maintain a clear picture of expenses. Another advantage is that rebates accumulate even during minor market activity, building an extra layer of measurable income. Since cashback works independently of strategy, both beginners and professionals can benefit equally. Those who trade intensively may receive significant monthly rebates, enhancing stability and growth potential over time. Across today’s global forex market, any reduction in commissions becomes meaningful, and cashback programs stand out as one of the most accessible ways to optimize expenses. Choosing a reliable cashback provider guarantees clear terms, punctual credits, and consistent advantages, positioning rebates as an important feature of profitable long-term trading.

  5. https://myforexcashback.com/forex cashback bonus, forex rebate system is a financial tool intended to refund part of transaction expenses commonly deducted by broker platforms. This model helps reduce overall trading expenses, helping traders maintain a more profitable cost structure, particularly for high-volume traders. Rebates are generally credited automatically either per trade or by period, ensuring a consistent monetary return. Through participating in forex rebate programs, users can strengthen their long-term profitability all while keeping their strategies unchanged. The main step is picking a proven cashback partner, connecting the account and operating normally. Numerous brokers work with rebate platforms, enabling users to trade on their chosen terminal while still getting valuable cashback credits. Forex rebates likewise offer clarity, allowing users to monitor each refunded value, making budget management more predictable. An added benefit is accumulation of rebates even with smaller trade frequency, building an extra layer of measurable income. Because cashback does not require changes in strategy, traders of all skill levels can utilize it effectively. Active traders may see notable accumulated payouts, strengthening the long-term robustness of their method. Across today’s global forex market, every reduction of cost matters, and cashback programs stand out as one of the most accessible ways to optimize expenses. Working with a credible cashback platform secures stable payouts, accurate tracking, and dependable performance, positioning rebates as an important feature of profitable long-term trading.

  6. https://myforexcashback.com/forex cashback bonus, forex rebate system represents a useful trading feature created to give back a portion of spreads or commissions commonly deducted by broker platforms. This approach minimizes cumulative trading costs, making each trade more cost-efficient, especially for those working with high volumes. The rebate is typically issued automatically either per trade or by period, ensuring a consistent monetary return. Through participating in forex rebate programs, users can strengthen their long-term profitability all while keeping their strategies unchanged. The main step is picking a proven cashback partner, linking the trading account, and continuing to trade as usual. Numerous brokers work with rebate platforms, letting traders stay with the platform they prefer while still getting valuable cashback credits. Cashback structures support transparency, as traders can track every refunded amount, making personal financial planning easier. A further advantage is that earnings accumulate regardless of market intensity, forming a steady supplementary return. Because cashback does not require changes in strategy, traders of all skill levels can utilize it effectively. Active traders may see notable accumulated payouts, further improving the long-term sustainability of their trading approach. In the competitive forex environment, any reduction in commissions becomes meaningful, and cashback programs stand out as one of the most accessible ways to optimize expenses. Working with a credible cashback platform guarantees clear terms, punctual credits, and consistent advantages, turning cashback into a vital part of an efficient trading environment.

  7. https://myforexcashback.com/forex rebate, forex cashback is a financial tool designed to return part of the trading costs usually charged by brokers. This model helps reduce overall trading expenses, increasing the cost-efficiency of every trading action, which is extremely beneficial for active traders. Such cashback is usually delivered without additional actions on a daily or weekly basis, providing a predictable financial benefit. Through participating in forex rebate programs, traders can improve their ROI without modifying their trading strategy. All that is required is selecting a reputable provider, attaching the account and following the standard routine. A wide range of brokers support cashback partnerships, enabling users to trade on their chosen terminal yet benefiting from important cashback returns. Forex cashback also provides transparency, as traders can track every refunded amount, making personal financial planning easier. Another advantage is that rebates accumulate even during minor market activity, building an extra layer of measurable income. Since cashback works independently of strategy, it suits both novice and experienced traders. Active traders may see notable accumulated payouts, enhancing stability and growth potential over time. Within the dynamic forex landscape, each decrease in trading expense is valuable, making rebate services an approachable method to reduce costs. Choosing a reliable cashback provider secures stable payouts, accurate tracking, and dependable performance, turning cashback into a vital part of an efficient trading environment.

  8. Проект загородного дома Интерьер загородного дома может сильно влиять на общее впечатление и уют, который он создает. При проектировании интерьера важно учитывать не только стиль, но и материалы, которые будут использоваться. Натуральные текстуры, такие как дерево и камень, привнесут в помещение атмосферу тепла и комфорта. Освещение также играет ключевую роль: правильное распределение света создает не только функциональность, но и задает настроение. Для создания гармоничного интерьера можно использовать комбинацию различных стилей, таких как современный и кантри, что позволит сделать пространство более интересным и индивидуальным.

  9. Льгота пенсионер Предпенсионный возраст – особый период в жизни человека, когда особенно важна поддержка государства и общества. Льготы предпенсионерам призваны обеспечить плавный переход к пенсионной жизни, защитить от дискриминации на рынке труда, предоставить возможности для переобучения и повышения квалификации. Забота о предпенсионерах – это инвестиция в будущее, гарантия того, что люди, готовящиеся к заслуженному отдыху, будут чувствовать себя уверенно и защищенно.

  10. тенты Отражающая изоляция – это современный материал, предназначенный для повышения энергоэффективности зданий и сооружений. Она состоит из слоя теплоизоляции, покрытого алюминиевой фольгой, которая отражает тепловое излучение, предотвращая его утечку зимой и проникновение летом. Отражающая изоляция эффективна как в жилых, так и в промышленных зданиях, позволяя снизить затраты на отопление и кондиционирование воздуха.

  11. Ветеран труда без наград Ветеран труда без наград – это зачастую незаметные герои трудового фронта, чьи заслуги, возможно, не были отмечены громкими званиями и орденами, но чей вклад в развитие экономики и социальной сферы неоценим. Длительный стаж, добросовестная работа, профессионализм – вот их главные отличительные черты. Несмотря на отсутствие формальных наград, государство и общество должны признавать и уважать их достижения, обеспечивая доступ к социальным льготам и поддержке, соответствующим их трудовому вкладу.