I need to record virtual Page Events with the Google Tag Manager PHP API.
So far I have this code:
$client = new Google_Client();
$client->setApplicationName("Partner Inquiry");
$client->setDeveloperKey("xxxxxxxx");
$service = new Google_Service_TagManager($client);
$eventName = new Google_Service_TagManager_Parameter();
$eventName->setList( array(
'event' => 'VirtualPageview',
'virtualPageURL' => '/partnerInquiry/partnerName',
'virtualPageTitle' => 'Partner Inquiry - Partner Name'
));
What do I call now.
My IDE autocompletion finds
$service->accounts
but how do I fire the event collection?