AI OnAI Off
You need to add an event handler to handle the On publish page event for the EPiSever
In your page initializer add
DataFactory.Instance.PublishedPage += new PageEventHandler(Instance_PublishedPage);
This will create a handler as below
void Instance_PublishedPage(object sender, PageEventArgs e)
{
//put your code here
}