FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » drupal php google analytics
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: drupal php google analytics [message #171008 is a reply to message #171006] Tue, 14 December 2010 22:05 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Magno wrote:
> On 12/14/2010 06:08 PM, Jerry Stuckle wrote:
>> On 12/14/2010 2:25 PM, canajien wrote:
>>> It has been a very long time since I have had to do any php
>>> programming, so please bear with me as I haven't been able to find an
>>> answer to this problem after several searches.
>>>
>>> There is a line of code in a drupal template that generates a link to
>>> download a file:
>>>
>>> <?php print $node->field_report_file[0]['view'] ?>
>>>
>>> this will generate something like this
>>>
>>> <a href="filename.pdf">filename</a>
>>>
>>>
>>> We are using google analytics with the website and we would like to
>>> track how many times people download a file as well, normally to track
>>> a link you would write the code to look like this:
>>>
>>> <a href="filename.pdf"
>>> onclick="pageTracker._trackPageview('filename.pdf");">filename</a>
>>>
>>> my problem is modifyng the drupal code to include the onclick, I have
>>> tried
>>>
>>> <?php print $node->field_report_file[0]['view'] print onclick=
>>> \"pageTracker._trackPageview('$node->field_report_file[0]['view']\");?
>>>>
>>>
>>>
>>> and several variations, but I know there is something wrong with my
>>> syntax and I can't simply insert print onclick=
>>> \"pageTracker._trackPageview('$node->field_report_file[0]['view']\");
>>> into the original command
>>>
>>> can someone point me in the write direction?
>>>
>>> thanks
>>
>> Try the Drupal site - they have a lot of people who are quite
>> knowledgeable about drupal and can help you.
>>
>> TNP's suggestion is mediocre, at best. It fails if, for instance, people
>> have javascript turned off - which includes robots which spider your
>> site.
>>
>
> I have always wondered why the troll keeps this much hatred against TNP.
> And everytime he can, he calls him mediocre, clueless, and such things.
>
> Anyone here knows?


I showed him up on at least three occasions to not have a clue about
that which he spouts. Quoting his beloved manuals that he studies at
night back to him.

Jerry doesn't like to be shown to be an ignorant pompous asshole. If you
grovel at his feet, he will graciously feed him tidbits of wisdom.

If you dare contest his ownership of the group, you are the spawn of the
devil.

It's a psychological condition he has. Right Man syndrome.

He wants desperately to be a Guru, but he's not good enough so he *acts*
like he is one, and hopes no one will come along who can see through him.

Sadly I did.

What pains him worse, is that I don't even want to be a guru. Its
somehow makes his puny ambitions seem like..puny ambitions.

I mean. look at the response above. The guy wants to know how to frame
an onclick statement to call up some javascript in a drupal framwork.

Jerry says 'no one would ever use javascript, and that's typical of TNP'
But sadly the OP wanted to know how to use javascript.

He has to change the subject and set up a straw man to recover his
godlike status. In his own eyes.

to anyone else, he just makes himself look like what he is. From time to
time I goad him a little so everyone with any intelligence can see the
asshole for what he is: the rest still think he wonderful, but then they
deserve him.

I killfiled him years ago.I never even as a PHP beginner found anything
he said was not said better, more helpfully and more politely by someone
else. In my lurking here, he has criticised everybodies code. I never
saw him post a line of his own. He is I believe a one man IT training
consultant. You can look up his company records and see how much he has
earnt in the last few years. Its very sad.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: anyone?
Next Topic: require*/include*: compile-time or runtime?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 17:12:52 GMT 2024

Total time taken to generate the page: 0.04249 seconds