Issue in GetPrevious Page Name | Community
Skip to main content
Level 2
June 4, 2021
Solved

Issue in GetPrevious Page Name

  • June 4, 2021
  • 2 replies
  • 1380 views

Hi All,

I am able to get a previous page name but in the same hit that variable value get changed to the current page name. Can you please suggest on this?

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Andrew_Wathen_

This sounds like the getPreviousValue plugin is being called multiple times in the same page load.

 

One thing to check is that you are only calling getPreviousValue when a page view occurs (e.g. not on link tracking calls or other events).

 

For instance, if you've put the getPreviousValue function call in doPlugins it's easy to accidently cause this to run multiple times as doPlugins runs all the time for various reasons (not just on page view).

2 replies

Level 2
June 4, 2021

Hi,

I have also encountered the same issue with my previous experience. It was due to different actions happening in between 2 pages. The action could be below:

1. Reload of page.

2. Form submit can be happen.

3. redirection to same page.

 

You can check for other actions which are happening on your current page. If you are sure non of the above action is happening, you can contact Adobe support.

Also, It should not happen accross the website. If it's happenning across the website, something is wrong with the configuration.

 

Regards,

Darpan

Andrew_Wathen_
Community Advisor
Andrew_Wathen_Community AdvisorAccepted solution
Community Advisor
June 4, 2021

This sounds like the getPreviousValue plugin is being called multiple times in the same page load.

 

One thing to check is that you are only calling getPreviousValue when a page view occurs (e.g. not on link tracking calls or other events).

 

For instance, if you've put the getPreviousValue function call in doPlugins it's easy to accidently cause this to run multiple times as doPlugins runs all the time for various reasons (not just on page view).