Title: mtgpuzzles's Replies | WordPress.org

---

# mtgpuzzles

  [  ](https://wordpress.org/support/users/mtgpuzzles/)

 *   [Profile](https://wordpress.org/support/users/mtgpuzzles/)
 *   [Topics Started](https://wordpress.org/support/users/mtgpuzzles/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mtgpuzzles/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mtgpuzzles/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mtgpuzzles/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mtgpuzzles/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mtgpuzzles/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CodeBard's Patron Button and Widgets for Patreon] Possible to add Google Analytics outbound traffic tracking?](https://wordpress.org/support/topic/possible-to-add-google-analytics-outbound-traffic-tracking/)
 *  Thread Starter [mtgpuzzles](https://wordpress.org/support/users/mtgpuzzles/)
 * (@mtgpuzzles)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/possible-to-add-google-analytics-outbound-traffic-tracking/#post-9624367)
 * Thanks. For the novice programmer, could you elaborate a little further on how
   exactly this would be implemented?
 * Right now I’m not even using the custom function in my OP, just the built in 
   ga function as an onclick in the href tag in core_actions.php:
 * <a href … onclick=”ga(‘send’, ‘event’, ‘outbound’, ‘click’, url, {
    ‘transport’:‘
   beacon’, ‘hitCallback’: function(){document.location = url;});” …>
 * (Where in fact all my ‘ characters are currently written out as & # 0 3 9 ; )
 * Would I need to actually make my own function now? From your example here, I’m
   a little unsure of what does what.
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CodeBard's Patron Button and Widgets for Patreon] Possible to add Google Analytics outbound traffic tracking?](https://wordpress.org/support/topic/possible-to-add-google-analytics-outbound-traffic-tracking/)
 *  Thread Starter [mtgpuzzles](https://wordpress.org/support/users/mtgpuzzles/)
 * (@mtgpuzzles)
 * [9 years ago](https://wordpress.org/support/topic/possible-to-add-google-analytics-outbound-traffic-tracking/#post-9582043)
 * Okay, to fully close the loop, I discovered that the issue of editing the ga 
   function into core_actions.php is that Javascript needs the ‘ character to properly
   bound its variables, and php is seeing them as part of its code, so they were
   getting confused.
 * I had to instead replace the ‘ with its ASCII code & # 0 3 9 ; (without spaces)
 * The code looks totally ridiculous as a result, but (somewhat to my surprise),
   it worked!
    -  This reply was modified 9 years ago by [mtgpuzzles](https://wordpress.org/support/users/mtgpuzzles/).
    -  This reply was modified 9 years ago by [mtgpuzzles](https://wordpress.org/support/users/mtgpuzzles/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CodeBard's Patron Button and Widgets for Patreon] Possible to add Google Analytics outbound traffic tracking?](https://wordpress.org/support/topic/possible-to-add-google-analytics-outbound-traffic-tracking/)
 *  Thread Starter [mtgpuzzles](https://wordpress.org/support/users/mtgpuzzles/)
 * (@mtgpuzzles)
 * [9 years ago](https://wordpress.org/support/topic/possible-to-add-google-analytics-outbound-traffic-tracking/#post-9578251)
 * Nevermind, I believe I figured it out using the ga(‘send”,….); function directly.
   I guess I’ll know when events start working.. or not. 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Collapse-O-Matic] Expands on page load if post preview is a search result](https://wordpress.org/support/topic/expands-on-page-load-if-post-preview-is-a-search-result/)
 *  Thread Starter [mtgpuzzles](https://wordpress.org/support/users/mtgpuzzles/)
 * (@mtgpuzzles)
 * [9 years ago](https://wordpress.org/support/topic/expands-on-page-load-if-post-preview-is-a-search-result/#post-9493653)
 * Thanks! It took me a little while to figure out how to enqueue the JS in my child
   theme, but found that part of the answer here:
 * [https://teamtreehouse.com/community/wordpress-how-to-enqueue-script-to-child-theme](https://teamtreehouse.com/community/wordpress-how-to-enqueue-script-to-child-theme)
 * Thanks again!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Collapse-O-Matic] Expands on page load if post preview is a search result](https://wordpress.org/support/topic/expands-on-page-load-if-post-preview-is-a-search-result/)
 *  Thread Starter [mtgpuzzles](https://wordpress.org/support/users/mtgpuzzles/)
 * (@mtgpuzzles)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/expands-on-page-load-if-post-preview-is-a-search-result/#post-9473508)
 * Yep.
 * Go to the URL, you’ll see the default load being a number of recent posts.
 * Then click one of the filter options on the right. After it does its thing (autoload/
   AJAX), the filtered results will show up.
 * Usually the results will still have the expanded text hidden this first time,
   but then if you click another filter, usually all the results now will have the
   expanded text showing.
 * Is this a callback thing like I’ve seen in other threads? If so, I have no idea
   how to implement it :/ But I am using a child theme of twentyeleven.
 * Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)