Knowledgebase: SmarterStats

How to Automate Login to SmarterStats

Posted by on September 09 2015 05:39 PM

The code below demonstrates how you can make a text link (e.g. "See Your Stats") automatically log in to the SmarterStats application. You can place this on a new or existing page on your website, if desired. For the example code listed below, the form values are set as generic text (e.g. "put_their_siteid_or_domain") to show where you would hard code values that will be submitted to the login.aspx page. You could also dynamically generate these values using a scripting language like ASP or ColdFusion (a sample ASP script would substitute value="put_their_siteid_or_domain" with value=<% =txtSiteID %>).


<SCRIPT LANGUAGE="JavaScript"> function GoToStats() { document.statsform.submit(); } </SCRIPT>


<form name="statsform" action="" method="post"> <input type="hidden" name="shortcutLink" value="autologin" id="shortcutLink"> <input type="hidden" name="txtSiteID" id="txtSiteID" value="put_their_siteid_or_domain"> <input type="hidden" name="txtUser" id="txtUser" value="put_their_username"> <input type="hidden" name="txtPass" id="txtPass" value="put_their_password">

<p><a href="JavaScript:GoToStats()">Log into your stats</a></p>


If you have any further questions that were not answered in this article, please contact us.


(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Copyright © 2016 HostMySite