Which Rules Event can I use for automatic login from main site to sub site with same database after clicking on a link?
I'm pretty sure that the "... Content is viewed, but actually it doesn't get called at all ..." part of your question is not correct. And that this Rules Event does get called (if not you've found a major Rules bug ...), but that it is NOT the right Rules Event to use for your scenario. Read on for details (and a possible solution) ...

You should be able to get this to work, using the Rules module, using the "Drupal is initializing" event. That will ensure that the rule gets triggered BEFORE the actual content is shown. Using Rules event " Content is viewed " is typically 'too late'. Refer to 'How to specify a Rules event like &quot;Content is &#39;going to be&#39; viewed&quot;?' for more details on that. Adapt your rule to use this event, and (just for temporary unit testing) add a Rules Action (as the very first Rules Action) to "Show a message on a site", e.g to say 'Bingo, let the Rules party begin (we did find a Rules Event to continue building on)'.

Moreover, as per the http://[node:author].[site:url-brief]/ajax_callback.php?context=buyer-redirect&amp;username=[account:name]&amp;nid=[node:nid] URL that you mentioned, you can make the value of the URL arguments (= such as the value of the context argument in this example) available as new variable to Rules, simply by using the Rules URL Argument module. Here is a quote about it (from its project page):


  ... provides two rules conditions based on URL arguments:
  
  
  check if a URL argument is present.
  compare the value of an URL argument.
  
  
  It also provides an action that makes the value of an URL argument available as new variable to Rules.


The newly provided Rules actions and conditions can be found under the "URL Argument" conditions and actions groups in the rule configuration interface.

For an example of how to use it, refer to Comment # 3 in issue # 1686360 which is about "Pass an amount to the url, ie; site/content/node-title?amount=10 or /node-title?=amount:10". Here is the relevant part of it:


  
  add a "Check if URL argument exist" condition to your rule and set the "ARGUMENT" value to "amount".
  add "Provide URL argument value" action to the rule and set "URL ARGUMENT NAME" value to "amount" and in the "Provided variables" section "ARGUMENT FROM URL - Variable name" to e.g. "amount_from_url".
  
  
  You will now be able to use the amount value as a variable "amount-from-url" for other actions in this rule.