We are looking to implement a feature on our page that allows users to add websites. The goal is for our application to generate JavaScript code that can be embedded into a website, resulting in hits being sent to the added websites whenever a user visits the parent website.
As an initial step, you can create the code by incorporating an Ajax call (for example, if the website is )
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function () {
$.post('https://www.google.co.in/', function(data) {
});
});
</script>
Subsequently, when the user adds another site (site 2), there should be an Ajax call made to both sites. Furthermore, when a site is added, display the generated code in a designated area where users can easily copy it.