As visitors click on products on my site, I am storing their IDs in a cookie.
Each click adds the new ID to an array stored in the cookie.
This is how I set up the cookie and its current value after a few clicks:
var cookieArray = [];
cookieArray.push('582');
For example, after clicking on 3 products with IDs 582, 590, and 572:
[582%2C590%2C572]
My question: Is the format of the cookie value correct for representing an array? Does the %2C
properly separate each ID?
Later, I will use PHP to retrieve this data and loop through each ID value.