What a weekend. While I was cleaning my office, doing dishes, prepping stories, and just generally being Dad, Tom Hanks, Sir Ian McKellen, and the rest of the cast of The Da Vinci Code were busy raking in $77 million at U.S. box offices, making the film the top draw at theaters around the nation. Globally, it has taken in $147 million since Wednesday. That's the best foreign start in history, according to movie tracker Box Office Mojo.

Remarkably, these outstanding results follow withering criticism in advance of the film's release. Were the critics wrong? I've no idea; I haven't seen the film. But I suspect not. I've read the book, and it is an extraordinarily fast-paced story. Accordingly, I wonder whether the film also leaves little time to relax. Or, for that matter, time for real character development.

But, again, I'm no film critic. I just think that the real Da Vinci Code is marketing, because Sony (NYSE:SNE) did a lot right in pitching this film. Take The Da Vinci Code Quest, for example, which was hosted by Google (NASDAQ:GOOG). The pair teamed to create a contest that comprised 24 puzzles and a potentially expensive final, five-puzzle challenge. No official numbers are available, but it seems as though the contest drew millions. Indeed, one blog covering the event -- which, sadly, became a haven for cheaters -- reports receiving more than 100,000 hits at the site.

And then there's the legions that were and still are bidding on the commemorative Da Vinci Code cryptex that was mailed to finalists like me. At press time there were 82 listings on eBay for the gizmo, which is going for as much as $237. (By the way, email me here if you want to make an offer on mine. Really.)

The hysteria leaves me breathless. And unsurprised. After all, I, too, was sucked intoThe Da Vinci Code Quest. Even now I'm contemplating entering a similar contest sponsored by Eurostar, which has christened its own Da Vinci Code train. Sheesh.

Here's what this means for you, Fool: Marketing is an incredibly powerful tool when used correctly. Companies that do it really well often generate higher revenue, better margins, and, thereby, better returns for investors. As this weekend's box office results prove, Sony and Google earn high marks in this area. Do you know how your stocks rate?

Money matters keeping you up at night? We're offering an exclusive teleseminar with Motley Fool co-founders David and Tom Gardner. They'll tell you when to buy and sell stocks in this uncertain market.

Fool contributor Tim Beyers thinks The Da Vinci Code is an addicting piece of fiction. And, yes, he will go see the movie if he gets a chance. Tim didn't own shares in any of the companies mentioned in this story at the time of publication. You can find out which stocks he owns by checking Tim's Foolprofile. The Motley Fool has an ironcladdisclosure policy.