Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7572319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:53:47+00:00 2026-05-30T15:53:47+00:00

I run a podcast using Podpress on WordPress with Thesis installed. Currently, Podpress has

  • 0

I run a podcast using Podpress on WordPress with Thesis installed. Currently, Podpress has its own internal stats system for tracking plays and downloads, but I’d like to extend it by adding some Google Events Tracking when listeners click do download/play/whatever a media file. Below, I’ve included an example of the HTML code that our system generates for a new entry:

<div class="teasers_box">

            <div id="post-2855" class="post-2855 post type-post status-publish format-standard hentry category-episodes teaser">

<h2 class="entry-title"><a title="Permanent link to Show Title" rel="bookmark" href="http://www.test.com/2012/02/22/show-title/">Show Title</a></h2>
<abbr title="2012-02-22" class="teaser_date published">February 22, 2012</abbr>

<div class="format_teaser entry-content">
<p>Show Description</p>
<div class="podPress_content podPress_content_audio_mp3">
<div style="display:block;" class="podpress_playerspace podpress_playerspace_audio_mp3 podpress_mp3player"></div>

<div class="podPress_downloadlinks podPress_downloadlinks_audio_mp3"><a class="podpress_downloadimglink podpress_downloadimglink_audio_mp3" title="Download: Show Title" target="new" href="http://www.test.com/podpress_trac/web/2855/0/2012_02_22_showtitle.mp3"><img alt="" class="podPress_imgicon podpress_imgicon_audio_mp3" src="http://www.test.com/wp-content/plugins/podpress/images/audio_mp3_button.png"></a> <span class="podpress_mediafile_title podpress_mediafile_title_audio_mp3">Show Title</span> <span class="podpress_mediafile_dursize podpress_mediafile_dursize_audio_mp3">[ 39:21 ]</span> <a class="podpress_downloadlink podpress_downloadlink_audio_mp3" target="new" href="">Download</a></div></div>
</div>

I have some jQuery code that some kind folks helped me with earlier on this board. I’ve been tinkering with it to try and figure out exactly what I want. For now, here is what I have:

$('a.podpress_downloadlink_audio_mp3').click(function(e) {
     e.preventDefault();
      var $a = $(this);
      //  $a is the anchor that was clicked. you can access attributes or its  text to populate the _gaq.push call below.  e.g. var text = $a.text();

     var title = $a.closest('entry-title').text();
     _gaq.push(['_trackEvent', 'Podcasts', 'Download', title]);
    });

Basically, my problem is that I need to sort back through the DIV in order to pick up the title of the podcast episode (in this example, it’s just “Show Title”) which I can pass along to Google Analytics. I’m trying to use the .closest() technique to do this, but I’m thinking I’m using this incorrectly. Though I’d like to go in and actually modify the PHP behind the Podpress plugin with this, my fear is that an update will wipe out my code and force me to re-do it at some point. It may be easier to write a script that snaps this functionality on top.

Any advice on how to acquire this title would be greatly appreciated. My current efforts seem to be failing.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:53:49+00:00Added an answer on May 30, 2026 at 3:53 pm

    I know what you mean about not changing the PHP in the module, you always want to avoid that when possible.

    Not knowing how your html will look with multiple podcast nodes, you could try this – http://jsfiddle.net/CcdDA/

    var title = $a.parents('.format_teaser').siblings().prev('h2.entry-title').text();
    

    Worked for me. Hope it helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run my blog using Wordpress and all too recently became a big believer
In podcast #15, Jeff mentioned he twittered about how to run a regular event
I have rvm installed on a Mac OS X 10.6 system with the system
I run into a problem using session in .php file i attached in jumi
Background We're doing a proof-of-concept around Sharepoint 2007. It's installed using VMWare on Windows
run the following, and its supposed to return the company name. The xpath works
The run loop for the secondary thread of my application is below. It has
I run a medium sized website on an ASP.net platform and using MS SQL
I run a search using google.maps.places.PlacesService(map) and then I place markers on the map
I run a wordpress blog. I want my blog to be available only for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.