Hello everyone. We have a problem with our rudders...
# support
w
Hello everyone. We have a problem with our rudderstack implementation on frontend side. Here is a function that we use on frontend side to handle events.
const trackPageContext = (pageName: string) => {
window.rudderanalytics.page("", pageName, {
path: window.location.pathname,
referrer: document.referrer,
title: document.title,
url: window.location.href,
parent_window_url: getParentUrl(),
});
};
We definitely know that this function is called only once but in network we always see 2 requests to /page. The second request includes name: "Home Page" but the first one even doesn't have any name field (that's so strange). It looks like the issue is related to inner implementation of rudderstack and we cannot figure out how to fix it. We definitely don't want to duplicate each request. Could you help with that issue? Feel free to ask more details.
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
w
image.png
In any case I’ve got doubled number of views for each session. I think that it’s the reason
m
Hi Andrey, can you check the `Type`⁣ and `Request Method`⁣ of the second page call? Is type `Preflight `⁣ and Request Method `OPTIONS`⁣ then you need not worry. This happens only for the first page and is not counted towards your overall event volume. Yes this is an implementation thing.