Answers.Body: <p>If you're looking for an "audit trail" of pages a user has visited, then a plugin will be the way to go.</p>
  
  <p>You'd want to track a user by something like their PHP session ID.  And for every request grab that session ID and the URI and save that in a your plugin's dedicated audit table in the database (no need to use entries for this).</p>
  
  <p>When the user goes to their history page, you'll query your audit table and grab any rows with a matching PHP session ID and display them however you want.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-15T03:47:11.257Z
Answers.Text: What's the advantage of using the PHP Session ID as opposed to their username? Will that remain constant for users across devices and logins? 
  
  I'm not so interested in recording anonymous users.
Answers.UserDisplayName: j00lz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-15T03:48:34.277Z
Answers.Text: If you're requiring them to be logged in, then nothing... use the username. I was just assuming they wouldn't be logged in.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-14T18:06:08.110Z
Answers.LastActivityDate: 2014-11-14T18:06:08.110Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'd like to create a history section so logged in users can see which pages they have visited.</p>
  
  <p>Is there a way to post an entry without using a form? So the user does not have to click to say he has visited a page, instead as soon as they visit the page it is logged into a history section (the user and the page slug)</p>
  
  <p>I've thought about doing it with javascript but it seems a little messy. Is there a native neat way to do this? Or a simple way to achieve it with a plugin?</p>
  
  <p>Thanks in advance :)</p>
  
Tags: <entry><post>
Title: Posting an entry without using a form?
ThreadText: # Posting an entry without using a form?
  
  (Asked by: username_0 on 2014-11-14)
  
  I'd like to create a history section so logged in users can see which pages they have visited.
  
  Is there a way to post an entry without using a form? So the user does not have to click to say he has visited a page, instead as soon as they visit the page it is logged into a history section (the user and the page slug)
  
  I've thought about doing it with javascript but it seems a little messy. Is there a native neat way to do this? Or a simple way to achieve it with a plugin?
  
  Thanks in advance :)
  
  **Tags:** entry, post
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-11-14. Score: 1 | Accepted answer
  
  If you're looking for an "audit trail" of pages a user has visited, then a plugin will be the way to go.
  
  You'd want to track a user by something like their PHP session ID. And for every request grab that session ID and the URI and save that in a your plugin's dedicated audit table in the database (no need to use entries for this).
  
  When the user goes to their history page, you'll query your audit table and grab any rows with a matching PHP session ID and display them however you want.
  
  > **Comments:**
  > **username_0**: What's the advantage of using the PHP Session ID as opposed to their username? Will that remain constant for users across devices and logins?   I'm not so interested in recording anonymous users.  
  > **username_1**: If you're requiring them to be logged in, then nothing... use the username. I was just assuming they wouldn't be logged in.  
  
  ---
  
  