I wrote a simple PHP analytics script (only 77 lines of code including commenting). It does the following:
a) Gathers the URL, timestamp, IP address, and browser of a visitor.
b) Extracts a unique customer identifier from the URL.
c) Inserts the data into a MySQL database.
The script works fine as a standalone script, but I want to be able to embed it into Wordpress pages on a few different websites (that can all access the same MySQL database).
I don't care how this problem is solved. I only care that it is fast, simple, and secure so it doesn't make the sites vulnerable to attack.
You could:
1) Make it work in PHP as a server side script, modifying it to work with Wordpress.
Or
2) Port it to Javascript to make it work as a client side script, possibly?
I'm not a professional coder. You tell me the best way to do this.
Important Notice: Perfectlancer.com End of Service Thank you for being a part of the Perfectlancer community. We regret to inform you that Perfectlancer.com will be shutting down its services effective October 10th, 2024. We understand this news may be inconvenient, and we apologize for any disruption it may cause. For our valued users: We encourage you to download any important data or project information from your account before October 10th. After this date, access to your account and website features will no longer be available. We recommend exploring alternative freelance platforms to continue your projects or find new opportunities. For potential investors or buyers: Perfectlancer.com holds the potential for a new owner to revitalize the platform. If you are interested in acquiring Perfectlancer.com or its assets, please submit your inquiries to admin@perfectlancer.com . We appreciate your understanding and support throughout our journey. Sincerely, The Perfectlancer.com Team