How to get the Visitor Profile Widget for the correct visitor on my site?

My company just redid their checkout process and with it we redid the web interface for looking at and tracking our orders. Well on the new page we want to integrate the info from the Visitor Profile widget into it. So I’m starting small and just trying to include the entire widget onto our site and it’s not working. I copied the code from the widgets page for the iframe and at the end of the src I added the visitorId variable. What I end up seeing is the visitor profile of the most recent visitor to our site and not the visitor I requested. I can’t figure out what’s going on. And sometimes I get this error:

Key “lastVisits” for array with keys “” does not exist in “@Live/getVisitorProfilePopup.twig” at line 2

Here is the code I’m using when I get the above error:

I have everything hardcoded in for testing but the date and visitorId will be added via variable in the end.

Ok here’s an update, I gave the wrong piece of code. Here’s the code I’m using without the hardcoding. I’m obtaining the visitorId via the PHP api, btw. Also I am now getting the right person or the above error.

That’s very interesting idea!! :slight_smile:

Could you please upgrade to 2.2.0-rc2 and see if the bug is still here?

also try to replace period=day by period=month or year, do you see the error less often?

I’d like to reproduce the issue to fix it. can your eproduce it on demo.piwik.org ?

Thanks for the reply!

Upgraded to 2.2.0-rc2 and we still have about the same amount of errors.

Changing the period from month or year doesn’t seem to help either.

I went to try and test it out on the demo but I figured I couldn’t use my visitor ID’s with the demo site. I went to the visitor log page on the demo to grab some random IDs from the visitor profile but the link to get the profile wasn’t there! haha.

Any suggestions or more info you’d like?

Ok the best is that you can create a ticket at: dev.piwik.org with your information and how to reproduce. We will take a look,. thanks!